Skip to content

Instantly share code, notes, and snippets.

View LaserKaspar's full-sized avatar

Felix Kaspar LaserKaspar

View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 25, 2025 11:13
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@daveenguyen
daveenguyen / CheckInput.cs
Last active February 19, 2021 23:51
Just using this to see where the buttons are mapped to on my controller
using UnityEngine;
using System.Collections;
public class CheckInput : MonoBehaviour {
void Update(){
if ( Input.GetKeyDown ( KeyCode.JoystickButton0 )){Debug.Log("JoystickButton0");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton1 )){Debug.Log("JoystickButton1");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton2 )){Debug.Log("JoystickButton2");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton3 )){Debug.Log("JoystickButton3");}
@tawashi5454
tawashi5454 / gist:1366964
Created November 15, 2011 12:27
Arduino USB Keyboard
/**
* VirtualUsbKeyboard
*
* Enumerates itself as a HID (Human Interface Device) to a host
* computer using a USB shield. The Arduino then appears to the host to
* be a USB keyboard and keypress events can be sent on demand.
*
* This example watches the state of 6 push buttons and when a button
* is pressed it sends a matching keypress event to the host.
*