This file contains hidden or 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
# Note: this is not a fully functioning script! You will need to edit paths and other variables manually and it's adviced to run each command manually one after another | |
# install dependencies | |
# http://www.securitylearn.net/tag/deep-analysis-of-itunes-backup/ | |
sudo ARCHFLAGS='-arch i386 -arch x86_64' easy_install pycrypto | |
sudo easy_install M2crypto construct progressbar | |
# clone the decrypt tool source code | |
# hg stands for mercurial | |
hg clone https://code.google.com/p/iphone-dataprotection/ |
This file contains hidden or 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
for file in `git diff-tree --no-commit-id --name-only -r HEAD | sort | uniq` | |
do | |
if [ ${file: -3} == ".py" ] | |
then | |
flake8 --ignore=E121,E123,E124,E125,E126,E127,E128 $file | |
fi | |
if [ ${file: -3} == ".js" ] | |
then | |
jshint $file | |
fi |
This file contains hidden or 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
var lsCache = function() { | |
var TIMEOUT_DEFAULT = 60; | |
var self = { | |
set: function(key, val, timeout) { | |
var timeout = parseInt(timeout, 10) || TIMEOUT_DEFAULT; | |
var now = Math.round(new Date().getTime() / 1000); | |
localStorage.setItem(key, val); | |
localStorage.setItem(key + '.timeout', now * timeout); | |
}, |
This file contains hidden or 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
{ | |
"name": "servers", | |
"windows": [ | |
{ | |
"name": "zamboni", | |
"command": ". ~/s/z-runserver" | |
}, { | |
"name": "solitude", | |
"command": ". ~/s/s-runserver" | |
}, { |
This file contains hidden or 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
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// | |
// VARIABLES |
This file contains hidden or 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
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
This file contains hidden or 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
# Install homebrew. | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# Acquire compiled dependencies. | |
brew install python libxml2 mysql libmemcached openssl swig jpeg redis elasticsearch | |
# Start services. | |
mkdir -p ~/Library/LaunchAgents | |
ln -nfs /usr/local/Cellar/mysql/*/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ | |
ln -nfs /usr/local/Cellar/redis/*/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/ |
This file contains hidden or 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
void function() {//closure | |
var global = this | |
, _initKeyboardEvent_type = (function( e ) { | |
try { | |
e.initKeyboardEvent( | |
"keyup" // in DOMString typeArg | |
, false // in boolean canBubbleArg | |
, false // in boolean cancelableArg | |
, global // in views::AbstractView viewArg |
This file contains hidden or 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
// # tinyAMD: a Minimal AMD shim. | |
// I define Minimal AMD as the following: | |
// * Every define() call provides a module id field (no filename magic) | |
// * No additional network traffic to fetch modules | |
// * All dependencies must be defined before a module may be required | |
// ## Uses | |
// * small-footprint production shim for use with an r.js optimized project | |
// * If you write modules in Minimal AMD coding style, you can use tinyAMD |
This file contains hidden or 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
/* | |
Grep.js | |
Author : Nic da Costa ( @nic_daCosta ) | |
Created : 2012/11/14 | |
Version : 0.2 | |
(c) Nic da Costa | |
License : MIT, GPL licenses | |
Overview: | |
Basic function that searches / filters any object or function and returns matched properties. |