Skip to content

Instantly share code, notes, and snippets.

View JackWink's full-sized avatar
💭
garbage collecting

Jack Wink JackWink

💭
garbage collecting
View GitHub Profile
@JackWink
JackWink / gist:af959b00d4ec22883c6e
Last active February 23, 2016 21:36
React Native Resources
Redux
- http://redux.js.org/docs/introduction/index.html
- https://github.com/gaearon/redux-thunk
React Native
- http://facebook.github.io/react-native/docs/getting-started.html#content
- Components / Awesome React: https://github.com/jondot/awesome-react-native
- Example App: https://github.com/bartonhammond/snowflake
@JackWink
JackWink / test.py
Created August 19, 2014 15:36
Donna Example
#! /usr/bin/python
from curve25519 import Private, Public
from hashlib import sha1, sha256
from binascii import hexlify, unhexlify
phone_private_b = b"28043484b9df605855d6d2617ec661a8600ce562344de9feab4723f4a3c62469"
server_private_b = b"4015e96f6ef68f4c1776f32fb8cc3dbf665ad1488add08848a3261aabc59ee66"
phone_priv = Private(secret=unhexlify(phone_private_b))
@JackWink
JackWink / vim.rb
Last active December 18, 2015 21:59 — forked from mgrouchy/vim.rb
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/', :revision => '7a5c346861e1'
version '7.3.1237'
def features; %w(tiny small normal big huge) end
def interp; %w(lua mzscheme perl python python3 tcl ruby) end
@JackWink
JackWink / gist:3073498
Created July 9, 2012 00:04
Time independant
def compare(a, b):
if len(a) != len(b):
return False
result = 0
for x, y in zip(a, b):
result |= ord(x) ^ ord(y)
return result == 0
@JackWink
JackWink / gist:3073465
Created July 8, 2012 23:47
Timing attack
def compare(password, valid):
return password == valid
def salt(length):
ret = ""
for x in xrange(length):
rand = randint(0, len(string.letters) - 1)
ret += string.letters[rand]
return ret