Skip to content

Instantly share code, notes, and snippets.

View rjmackay's full-sized avatar

Robbie Mackay rjmackay

View GitHub Profile
@shnjp
shnjp / tunnel.py
Created March 5, 2011 06:29
ssh tunnel for Fabric
"""
Fabric tunneling utilities
by [email protected]
class ForwardServer and relates things are refere Robey Pointer's paramiko example.
(http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py)
usage::
with make_tunnel('[email protected]:10022') as t:
@edulan
edulan / transpose.php
Created August 10, 2011 12:08
PHP matrix transpose using a functional approach
<?php
$matrix = array(
array('a', 1, 2),
array('b', 3, 4),
array('c', 5, 6),
array('d', 7, 8)
);
$transpose = array_reduce(
$matrix,
@vectoroc
vectoroc / GlobalMercator.php
Created September 11, 2012 11:36
Port of GlobalMercator from python to php
<?php
###############################################################################
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers based on Google Maps and OpenLayers
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/
#
###############################################################################
@thebyrd
thebyrd / example.js
Last active December 25, 2015 05:19
A method that will inject npm modules listed as parameters in a constructor.
function SomeConstructor (request, npm, monk) {
// do something with the injected node modules
}
var instance = require('./injector')(SomeConstructor) // create a new instance with dependencies injected
@shadowhand
shadowhand / git_extdeps.sh
Last active August 29, 2015 13:56
Search for external static deps using git grep
# Git grep for external static deps (ignores static:: and self:: calls)
alias staticdeps="git grep -Pi '^(?!\s+[*\/]).+\b[a-z][a-z0-9_]++(?<!static|self)::'"
# can also be assigned as a git alias
# add --global if you want it everywhere
git config alias.extdeps "grep -Pi '^(?"'!'"\s+[*\/]).+\\b[a-z][a-z0-9_]++(?<"'!'"static|self)::'"
# usage, global search
git extdeps
@debloper
debloper / README.md
Last active November 7, 2024 13:05
Flashing Firefox OS on Flame Reference Devices

Flashing Flame Devices with Firefox OS

If you have a Flame reference device and wanna try out alternate versions of Firefox OS apart from the stock one, but not willing to build from source, then follow this mini-manual.

Get the build

You can download the packages from the Nightly Build directories of Mozilla FTP. You specifically need the following two files:

  • b2g-XX.0a1.en-US.android-arm.tar.gz (XX is the version number)
  • gaia.zip
@grugq
grugq / gist:03167bed45e774551155
Last active October 30, 2024 02:44
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.