This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts an animated gif to a spritesheet using ImageMagick | |
file_name=$(echo $1 | sed 's/\(.*\)\..*/\1/') | |
montage $1 -tile x1 -geometry '1x1+0+0<' -alpha On -background "rgba(0, 0, 0, 0.0)" -quality 100 $file_name.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This gist uses http://luapower.com/objc.html as an FFI. I think it works on it's own, but I would recommend | |
-- getting the whole LuaPower project, because all the libraries rock. | |
-- | |
-- This script will open a window that displays two rectangles. One red and one blue. | |
local glue = require'glue' | |
local objc = require'objc' | |
local ffi = require'ffi' | |
local pp = require'pp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIBS="libname1 libname2" | |
IGNOREFILES := file1.c file2.c | |
BIN=binname | |
CC=gcc-4.9 | |
########################################################### | |
#### NOTHING SHOULD NEED TO BE CHANGED BELOW THIS LINE #### | |
########################################################### | |
# Compiler options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'curses' | |
include Curses | |
str1 = "hello my name is jake" | |
str2 = "mah name is greg" | |
init_screen | |
start_color | |
crmode | |
noecho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str1 = "hello my name is jake" | |
str2 = "mah name is greg" | |
def printdiff(c, x, y, i, j) | |
return if c.nil? | |
if i > 0 and j > 0 and x[i] == y[j] | |
printdiff(c,x,y,i-1,j-1) | |
puts " " + x[i] unless x[i].nil? | |
elsif j > 0 and (i == 0 or c[i][j-1] >= c[i-1][j]) | |
printdiff(c,x,y,i,j-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby, Generate sql PLZ | |
require 'faker' # faker gem used to generate names/addresses/phone numbers | |
def gen_sql(tname, v) | |
id = 1 | |
10.times do | |
s = "INSERT INTO #{tname} (#{v.keys.join(",")}) VALUES (" | |
o = [] | |
v.values.each do |a| | |
if a == :id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hi clear | |
set background=dark | |
if exists("syntax_on") | |
syntax reset | |
endif | |
let g:colors_name = "bwop" | |
hi Normal ctermfg=7 ctermbg=0 | |
hi Directory ctermfg=gray | |
hi Search ctermfg=white ctermbg=blue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import gdb | |
class ListPrintCommand(gdb.Command): | |
"""print atoms""" | |
def __init__(self): | |
super(ListPrintCommand, self).__init__("print-atom", | |
gdb.COMMAND_DATA, gdb.COMPLETE_SYMBOL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// TO RUN EXPLOIT (this file just generates the junk needed to overflow to the return address): | |
// cc exploit.c; ./a.out | nc problems2.2016q1.sctf.io 1337 | |
int main() { | |
// EIP points to the current stack frame (so we want it to point at get_flag) | |
// | |
// We can do this by overwriting the old return address with the address for get_flag | |
// (which you can get by running `pd 1 @ sym.get_flag` in radare) |
OlderNewer