Skip to content

Instantly share code, notes, and snippets.

View LaserKaspar's full-sized avatar

Felix Kaspar LaserKaspar

View GitHub Profile
@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.
*
@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");}
@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
@tatygrassini
tatygrassini / 1001-albums
Last active November 4, 2024 20:11
1001 Albums You Must Hear Before You Die
1001 Albums You Must Hear Before You Die
List taken from then book edited by Robert Dimery.
Missing from the list:
Machito - Kenya 1957
Jack Elliot - Jack Takes The Floor 1958
Dolly Parton - Coat Of Mahy Colors 1971
George Jones - The Grand Tour 1974
R.D. Burman / Bappi Lahiri - Shalimar / College Girl 1975
@ethack
ethack / TypeClipboard.md
Last active May 4, 2025 03:07
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@Mygod
Mygod / export-ble-infos.py
Last active December 30, 2024 18:38
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@seckincengiz
seckincengiz / GroupUnityObjects.cs
Created January 3, 2018 11:32
Group unity objects in edit mode | (CTRL + G) | Unity3D
using UnityEngine;
using UnityEditor;
[ExecuteInEditMode]
public class GroupUnityObjects : Editor
{
[MenuItem("Edit/Group %g", false)]
public static void Group()
{
if (Selection.transforms.Length > 0)
@gbraad
gbraad / README.md
Last active April 27, 2025 18:37
Buy Me a Coffee

Buy Me a Coffee

Using inlined HTML

Buy Me A Coffee

<a href="https://www.buymeacoffee.com/gbraad" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
@aleksandar-babic
aleksandar-babic / nginx-vhost.conf
Created June 20, 2018 09:20
Wordpress behind NGINX reverse proxy
location /blog/ {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass https://test-blog.bitstarz.com/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on