Skip to content

Instantly share code, notes, and snippets.

View 0xcafed00d's full-sized avatar
👾
Pew. Pew. Pew.....

Lee Witek 0xcafed00d

👾
Pew. Pew. Pew.....
View GitHub Profile
@darthcloud
darthcloud / xb1_adaptive_hid_descriptor
Created June 21, 2020 19:09
Xbox One adaptive controller HID descriptor
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x05, // Usage (Game Pad)
0xA1, 0x01, // Collection (Application)
0x85, 0x01, // Report ID (1)
0x09, 0x01, // Usage (Pointer)
0xA1, 0x00, // Collection (Physical)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x15, 0x00, // Logical Minimum (0)
0x27, 0xFF, 0xFF, 0x00, 0x00, // Logical Maximum (65534)
@Achie72
Achie72 / updateDocs.sh
Created May 18, 2019 13:03
A PICO-8 HTML Updater
#!/bin/bash
# A PICO-8 HTML Updater made by Bela Toth - Achie72
# Helping for automatic local updating the doc files
# for github pages, with default index.html and .js names.
# 2019-05-18
BLUE='\033[0;34m'
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
@fnky
fnky / ANSI.md
Last active July 6, 2024 19:14
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@WesThorburn
WesThorburn / 1.Instructions.md
Last active March 14, 2024 22:11
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone https://github.com/emscripten-core/emsdk.git
  • Enter the cloned directory: cd emsdk
  • Checkout main: git checkout main
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./emsdk_env.sh
@josefnpat
josefnpat / readme.md
Last active May 26, 2024 09:00
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@0XDE57
0XDE57 / config.md
Last active July 7, 2024 00:25
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@msoap
msoap / script.go
Last active October 8, 2022 17:23
Run Go program as script
//usr/bin/env go run $0 "$@"; exit
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@nijikokun
nijikokun / about.md
Last active June 25, 2020 13:57
Revival minimal github pages theme (original by @orderedlist)

Revival Minimal Theme for Github Pages

I was tired of the unreadable minimal theme by @orderedlist so I overhauled the font sizing and typography to generate this beautiful modern style for forward thinking open source projects to use.

If you've ever used Gitbook, you'll be familiar with my modern / crisp styling and attention to detail.

Preview

Install

@amark
amark / allDone.js
Created November 16, 2014 10:26
parallel async JS micro library in 25LOC
var allDone = function(done){ // takes a callback that will be called as callback(errors, values) when all async parallel operations are finished.
var context = {task: {}, data: {}};
context.end = function(e,v){ return done(e,v), done = function(){} }; // this can always be called if you want to terminate early, like because an error.
context.add = function(fn, id){ // if the async operation you are doing replies with standard fn(err, value) then just pass in a string ID, else your own callback and ID.
context.task[id = (typeof fn == 'string')? fn : id] = false;
var next = function(err, val){
context.task[id] = true; // good, we're done with this one!
if(err){ (context.err = context.err || {})[id] = err } // record errors.
context.data[id] = val; // record the values.
for(var i in c.task){ if(c.task.hasOwnProperty(i)){ // loop over the async task checker
@tehshane
tehshane / Microsoft Sculpt Mobile Keyboard Remap
Last active March 9, 2024 05:18
AutoHotKey script that remaps the F1-F12 function keys on the Microsoft Sculpt Mobile keyboard to be pressed without having to use the Fn key. Disables some of the Windows 8 shortcuts, but leaves media keys intact.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; OPTIONAL: For those who use Home/End more than PgUp/PgDown, this flips their use with the Fn key.
; If you want the buttons to function as they are, add a semicolon (;) to the beginning of each line below.
Home::PgUp
End::PgDn
PgUp::Home