Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Jonarod
Jonarod / RadioBox.vue
Created November 23, 2019 18:23
Simple custom Radio component for Vue.js, compatible with v-model.
/**
* @usage:
*
* <RadioBox label="Foo" value="foo" v-model="MySelectedValue" />
* <RadioBox label="Bar" value="bar" v-model="MySelectedValue" />
* <RadioBox label="Baz" value="baz" v-model="MySelectedValue" />
*
* data(){
* return {
* MySelectedValue: "",
@christopher4lis
christopher4lis / util-elastic-collision.js
Last active April 23, 2024 15:40
A set of utility functions used to reproduce the effect of elastic collision within HTML5 canvas. Used in the Chris Courses tutorial video on collision detection: https://www.youtube.com/watch?v=789weryntzM
/**
* Rotates coordinate system for velocities
*
* Takes velocities and alters them as if the coordinate system they're on was rotated
*
* @param Object | velocity | The velocity of an individual particle
* @param Float | angle | The angle of collision between two objects in radians
* @return Object | The altered x and y velocities after the coordinate system has been rotated
*/
@xpando
xpando / ArchLinuxNotes.md
Last active April 23, 2024 15:39
My notes on installing and configuring Arch Linux.
@lopspower
lopspower / README.md
Last active April 23, 2024 15:38
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@metal3d
metal3d / PythonDIArticle.md
Last active April 23, 2024 15:37
Python DI

Python et l'injection de dépendance

Ah, ça... quand on parle d'injection et de dépendance, on s'attend tout de suite à se prendre une flopée de visiteurs en manque de substance plus ou moins illicites. En réalité, on va parler "pattern". Et surtout, je vais lancer un vieux pavé dans la marre en disant qu'en Python c'est pas super utile, ou du moins que le langage permet déjà de le gérer sans se faire mal.

Piqure de rappel

Conversation un matin au travail:

@spoike
spoike / svg_paths_cheatsheet.md
Last active April 23, 2024 15:36
Cheatsheet for SVG paths

Cheatsheet for SVG Path Data

Straight line commands

+------------+-------------------+--------+
| *M* or *m* | moveto            | (x y)+ |
+------------+-------------------+--------+
| *Z* or *z* | close path        | (none) |
+------------+-------------------+--------+
@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active April 23, 2024 15:36
Setup for XRDP using Nvidia Acceleration
#!/usr/bin/env bash
set -e
cd ~
sudo -v
# Make sure system is in a good, updated, clean, state.
sudo apt-get -y update
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 23, 2024 15:35
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@theguptaji
theguptaji / setup.md
Last active April 23, 2024 15:34
Setup nodemon for Typescript/express/ejs

Install nodemon in project dir

npm install -D nodemon

Create config file for nodemon in root folder named nodemon.json with following content

{
    "restartable": "rs",
    "ignore": [".git", "node_modules/"],
 "watch": ["src/"],
@botamochi6277
botamochi6277 / PIDController.cs
Last active April 23, 2024 15:33
Unity PID controller for position and rotation
using System.Collections;
using System.Collections.Generic;
// using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Serialization;
namespace BotaLab
{
/**
* @brief A Unity Component to control position and rotation with PID controller