Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
var fs = require('graceful-fs');
var crypto = require('crypto');
var glob = require("glob");
var pathlib = require('path');
var dict = {};
var pattern = "530755bkup082911/**/*";
console.log("Walking directory tree ...");
var paths = glob.sync(pattern);
@kfatehi
kfatehi / README.md
Last active September 24, 2021 16:51
Compiling libimobiledevice on Raspberry Pi

iPhone Tethering on Raspberry Pi

The instructions here are useful although the current packages in Arch and Debian repositories do not work with iOS 7 (Trust Loop Bug) but it is still a good starting point to understand how this works.

https://wiki.archlinux.org/index.php/IPhone_Tethering

iOS 7 Support

Install libimobiledevice from latest source

@kfatehi
kfatehi / rgbMatrix.js
Last active August 29, 2015 13:56
rgb888 print matrix w/ nodejs
// Could send base64 to browser and work on it there
// http://blog.danguer.com/2011/10/24/base64-binary-decoding-in-javascript/
// nice explanation of readable streams
// http://codewinds.com/blog/2013-08-04-nodejs-readable-streams.html
// official docs about it
// http://nodejs.org/api/stream.html#stream_class_stream_readable
// more jump off points
@kfatehi
kfatehi / app.js
Created March 11, 2014 23:24
basic backbone.js usage
var data = {
people: [
{
"id": "1",
"img": "1-dan.jpg",
"name": "Dan"
},
{
"id": "2",
"img": "2-ron.jpg",
@kfatehi
kfatehi / server.js
Created April 29, 2014 22:22
example of using cluster, domain, memwatch
var token = process.env.NOS_TOKEN;
var relayServer = process.env.RELAY_SERVER;
if (!token) { throw new Error("missing environment variable NOS_TOKEN"); }
if (!relayServer) { throw new Error("missing environment variable RELAY_SERVER"); }
(function() {
"use strict";
var config = {
@kfatehi
kfatehi / manifest.sh
Last active August 29, 2015 14:00
ubuntu manifest script
# curl https://gist.github.com/keyvanfatehi/ea54e9bcc663782562d6/raw/manifest.sh | bash
# i use this for VMs, will update as needed
sudo apt-get update && sudo apt-get install git tmux vim
git clone https://github.com/keyvanfatehi/config.git && cd config && bash manifest
@kfatehi
kfatehi / README.md
Last active August 29, 2015 14:00 — forked from jgeurts/install-graphite-ubuntu-12.04.sh
Graphite 0.9.12 Installer for Ubuntu 12.04

Graphite + Carbon

An all-in-one image running graphite and carbon-cache. Version: 0.9.12.

This script contains a sensible default configuration of graphite and carbon-cache. Starting this container will, by default, bind the the following host ports:

  • 80: the graphite web interface
  • 2003: the carbon-cache line receiver (the standard graphite protocol)
@kfatehi
kfatehi / README.md
Last active October 6, 2015 02:12
Logstash Install
@kfatehi
kfatehi / 00-kernel-upgrade.sh
Last active August 29, 2015 14:00
Docker HTTP Host Manifest Ubuntu 12.04 LTS
apt-get -y update
apt-get -y install linux-image-generic-lts-raring linux-headers-generic-lts-raring
reboot
input {
lumberjack {
# The port to listen on
port => 32451
# The paths to your ssl cert and key
ssl_certificate => "path/to/ssl.crt"
ssl_key => "path/to/ssl.key"
# Set this to whatever you want.