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.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
#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; |
ffmpeg -i <infile> -ac 2 -f wav <outfile> |
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 ) ) |
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) |
# 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; |
/* | |
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 |
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.
/* | |
* LOGO | |
*/ | |
[aria-label="Twitter"] { | |
display: none; | |
} | |
/* | |
* LEFT COLUMN |