Skip to content

Instantly share code, notes, and snippets.

View cvan's full-sized avatar
🚌
🌊

Christopher Van Wiemeersch cvan

🚌
🌊
View GitHub Profile
@John07
John07 / iOS messages export.sh
Last active March 16, 2024 22:38
Get all your messages (SMS and iMessage) from your iOS device without jailbreak or proprietary tools. Assumes you have an encrypted backup of your iOS device on your Mac.
# 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/
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
@robhudson
robhudson / lsCache.js
Last active December 14, 2015 16:09
caching and localStorage
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);
},
{
"name": "servers",
"windows": [
{
"name": "zamboni",
"command": ". ~/s/z-runserver"
}, {
"name": "solitude",
"command": ". ~/s/s-runserver"
}, {
@JISyed
JISyed / MoveCamera.cs
Last active August 26, 2024 05:45
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// 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
@SlexAxton
SlexAxton / .zshrc
Last active March 24, 2025 17:35
My gif workflow
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
@cvan
cvan / z.sh
Last active July 31, 2022 06:52
install zamboni
# 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/
@termi
termi / crossBrowser_initKeyboardEvent.js
Last active June 13, 2023 02:01
Cross-browser initKeyboardEvent
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
@potch
potch / tinyAMD.js
Last active February 11, 2024 22:34
Proposal shim for a Minimal AMD system
// # 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
@nicdaCosta
nicdaCosta / Grep.js
Last active March 9, 2024 13:39
Basic function that searches / filters any object or function and returns matched properties.
/*
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.