Skip to content

Instantly share code, notes, and snippets.

View ZacharyTalis's full-sized avatar
☢️

Zachary Talis ZacharyTalis

☢️
View GitHub Profile
@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@castano
castano / hemicube.cpp
Created June 20, 2014 09:46
Hemicube Integrator
#include "hemicube.h"
#define PACK_HEMICUBES 1
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) {
// Unwrapped hemicube with positive-Z in the middle.
switch (index) {
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break;
@Bonno
Bonno / mp4-to-wav
Created February 10, 2015 09:24
Convert mp4 to WAV with ffmpeg
ffmpeg -i <infile> -ac 2 -f wav <outfile>
@tanyuan
tanyuan / pacman.md
Created February 29, 2016 03:48
Useful commands for pacman and yaourt.

Arch Linux Pacman & Yaourt Package Manager

Pacman (Official)

Easter egg

Edit /etc/pacman.conf:

Under the # Misc options section, remove the # in front of Color and add the line ILoveCandy. Because Pac-Man loves candy.

@varlen
varlen / lcd.py
Last active April 18, 2024 00:02
Writing on LCD Display using Python and Arduino. Requires pyfirmata module.
from pyfirmata import Arduino, util, STRING_DATA
board = Arduino('COM6')
board.send_sysex( STRING_DATA, util.str_to_two_byte_iter('Hello!') )
def msg( text ):
if text:
board.send_sysex( STRING_DATA, util.str_to_two_byte_iter( text ) )
@NikolasTzimoulis
NikolasTzimoulis / witness_lz4d.py
Last active March 2, 2024 07:01 — forked from mfgmfg/witness_lz4d.py
Extract .SOUND files from the videogame The Witness
import struct
import sys
import os
MAX_OUTPUT_SIZE = 1 << 24 # 16 megabytes
def load_binary_file(fn, nbytes=100000000):
data = []
with open(fn, "rb") as src:
byte = src.read(1)
@jivoi
jivoi / gist:a33ace2e25515a31aa2ffbae246d98c9
Created June 14, 2017 13:27
Serving Random Payloads with NGINX
# Serving Random Payloads with NGINX
# add set_random module https://github.com/openresty/set-misc-nginx-module#set_random
# edit file /etc/nginx/sites-enabled/default
set_random $uri 1 3;
map $uri $payloads {
1 /payload.lnk;
2 /payload.hta;
3 /payload.exe;
@glossawy
glossawy / simpler.js
Last active August 3, 2020 03:39
Vanilla JS implementation of QuickSort that attempts to mimick ramda somewhat
/*
Vanilla js equivalent of a ramda quicksort (using ES6 features)
Note:
1. I use arrays and not lists
2. I do not implement the placeholder helper, not difficult to add but requires more thought
3. Opted for a curried ifThenElse function
4. In some places I use ES6 features to avoid further recursion, though its possible to encompass
the recursion in a foldl/foldr
5. I implement pipe to match the ramda example
@thefranke
thefranke / RSS.md
Last active April 16, 2024 09:03
A list of RSS endpoints, readers and resources

The RSS Endpoint List

Please refer to this blogpost to get an overview.

Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.

Social Media

Twitter

@ericwbailey
ericwbailey / twitter.css
Last active September 18, 2023 19:09
Stylus tweaks to fix Twitter's desktop web UI. #twitter #stylus
/*
* LOGO
*/
[aria-label="Twitter"] {
display: none;
}
/*
* LEFT COLUMN