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
DB = (key) -> | |
store = window.localStorage | |
get: -> | |
JSON.parse store[key] or "{}" | |
put: (data) -> | |
store[key] = JSON.stringify(data) |
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
import re | |
import sys | |
import pefile | |
from pydbg import * | |
from pydbg.defines import * | |
def parseidalog(file): | |
all_funcs = [] | |
f = open(file) | |
funcs = f.readlines() |
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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
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 <windows.h> | |
__declspec(naked) EvilFunction() | |
{ | |
/* | |
0007FA18 01001FC4 Ä. /CALL to MessageBoxW from notepad.01001FBE | |
0007FA1C 001503C8 È. |hOwner = 001503C8 ('Find',class='#32770',parent=003C029E) | |
0007FA20 000A3A88 ˆ:.. |Text = "Cannot find "junk"" | |
0007FA24 000A8F34 4.. |Title = "Notepad" | |
0007FA28 00000040 @... \Style = MB_OK|MB_ICONASTERISK|MB_APPLMODAL | |
*/ |
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 | |
from termcolor import colored | |
import sys, mechanize | |
with open(sys.argv[1]) as userfile: | |
users = [u.strip() for u in userfile.readlines()] | |
with open(sys.argv[2]) as pwfile: | |
passwords = [u.strip() for u in pwfile.readlines()] | |
for user in users: |
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 <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include "list.h" | |
void list_new(list *list, int elementSize, freeFunction freeFn) | |
{ | |
assert(elementSize > 0); | |
list->logicalLength = 0; |
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 <stdlib.h> | |
#include <assert.h> | |
#include "stack.h" | |
void stack_new(stack *s, int elementSize, freeFunction freeFn) | |
{ | |
s->list = malloc(sizeof(list)); | |
// make sure the malloc call didn't fail... | |
assert(s->list != NULL); |
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
# Display webcam image, plus plasma diagnostics | |
# version 2, 2013-09-25 | |
# Amar | |
# Changelog: | |
# v2: Very slight modification of http://matplotlib.org/examples/animation/dynamic_image.html | |
import numpy as np | |
import cv2 | |
import time | |
import matplotlib.animation as animation |
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
import sublime_plugin | |
import datetime | |
''' | |
__ __ __ __ | |
| \/ |_ _| \/ | | |
| |\/| | '_| |\/| |_ | |
|_| |_|_| |_| |_(_) | |
Project: Examples of using show_quick_panel in Sublime 2 |
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
import sublime | |
import sublime_plugin | |
''' | |
__ __ __ __ | |
| \/ |_ _| \/ | | |
| |\/| | '_| |\/| |_ | |
|_| |_|_| |_| |_(_) | |
Project: Examples of using custom dialog and messages in Sublime 2 |