Skip to content

Instantly share code, notes, and snippets.

View 0xabad1dea's full-sized avatar
🚫
no cooperation with ICE

0xabad1dea (Melissa Elliott) 0xabad1dea

🚫
no cooperation with ICE
View GitHub Profile
@mimming
mimming / a-sad-sort.php
Last active August 29, 2015 14:11
PHP wat
$foo = array(-1, NULL, 0, NULL, 0, NULL, -1);
echo "unsorted\n";
print_r($foo);
sort($foo);
echo "sorted once\n";
print_r($foo);
@btbytes
btbytes / hello.lua
Created August 11, 2011 01:25 — forked from randrews/hello.lua
Embedding Lua in C
-- Pack this into an object file with ld: ld -r -b binary -o hello.o hello.lua
print "Hello, World!"
@proger
proger / badge.py
Created February 11, 2013 15:47
run any process with a badge!
#!/usr/bin/env python
import sys
sys.path.insert(0, '/System/Library/PrivateFrameworks/LLDB.framework/Resources/Python')
import lldb
dbg = lldb.SBDebugger.Create()
dbg.SetAsync(False)
@Fuzion24
Fuzion24 / hello_world_128
Last active December 28, 2015 11:39
Tiny 128 byte ARM ELF Hello World
@if [%6]==[] goto error
@goto ok
:error
@echo USAGE: video2gif START_TIME DURATION WIDTH FRAME_RATE (DITHER_OPTIONS) (CROP_RECTANGLE width:height:x:y) INPUT OUTPUT
@goto end
:ok
@set PALETTE="%TEMP%\palette.png"
@eevee
eevee / extract-music.py
Created May 31, 2016 06:49
Python script to reconstitute music from a PICO-8 cartridge
# script to extract music from a pico-8
# requires exporting sounds from the pico-8 first!
# run as: python extract-music.py mygame.p8 sound%d.wav music%d.wav
# by eevee, do what you like with this code
from __future__ import print_function
import argparse
import struct
import wave
# Inspired by the following sentence that I ran across this morning:
#
# "f_lineno is the current line number of the frame - writing to
# this from within a trace function jumps to the given line
# (only for the bottom-most frame). A debugger can implement a
# Jump command (aka Set Next Statement) by writing to f_lineno."
#
# https://docs.python.org/2/reference/datamodel.html
#
# There is an older implementation of a similar idea:
@natw
natw / fizzbuzz.py
Created November 15, 2012 16:22
best fizzbuzz
import random
for i in range(0, 100):
if not i % 15:
random.seed(1178741599)
print [i+1, "Fizz", "Buzz", "FizzBuzz"][random.randint(0,3)]
@Neo23x0
Neo23x0 / fp-hashes.py
Last active March 10, 2020 14:25
Typical False Positive Hashes
# This GIST has been transformed into a Git repository and does not receive updates anymore
#
# Please visit the github repo to get a current list
# https://github.com/Neo23x0/ti-falsepositives/
# Hashes that are often included in IOC lists but are false positives
HASH_WHITELIST = [
# Empty file
'd41d8cd98f00b204e9800998ecf8427e',
'da39a3ee5e6b4b0d3255bfef95601890afd80709',
@sfan5
sfan5 / image2xterm.py
Last active July 13, 2020 18:24
Converts images into color sequences (xterm-256color)
#!/usr/bin/env python3
import sys
import getopt
from PIL import Image
xterm256colors = [ # http://pln.jonas.me/xterm-colors
(0, (0x00, 0x00, 0x00)), # SYSTEM
(1, (0x80, 0x00, 0x00)), # SYSTEM
(2, (0x00, 0x80, 0x00)), # SYSTEM
(3, (0x80, 0x80, 0x00)), # SYSTEM