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
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 |
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/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)) |
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 '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 |
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
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 |
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
def compare(password, valid): | |
return password == valid |
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
def salt(length): | |
ret = "" | |
for x in xrange(length): | |
rand = randint(0, len(string.letters) - 1) | |
ret += string.letters[rand] | |
return ret |