Skip to content

Instantly share code, notes, and snippets.

View jakemcgraw's full-sized avatar
📈
start up cash in sell out bro down

Jake McGraw jakemcgraw

📈
start up cash in sell out bro down
View GitHub Profile
@dhrrgn
dhrrgn / benchmark.php
Last active August 29, 2015 14:00
Handy Benchmarking Function
<?php
function benchmark($name, $iterations, Closure $function)
{
echo "Starting Benchmark: {$name} (".number_format($iterations)." Iterations)\n";
$start = microtime(true);
for ($i = 0; $i < $iterations; $i++) {
$function();
}
$elapsed = microtime(true) - $start;
#!/bin/bash
# update the system
sudo apt-get --yes update
sudo apt-get --yes upgrade
# node.js using PPA (for statsd)
sudo apt-get install --yes python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update --yes
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active May 4, 2024 17:03
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@cybear
cybear / raspberry_pi_optimization.md
Last active January 27, 2023 22:17
I read up a little on performance optimization for the Raspberry Pi, and gathered the links before they disappear from my short term memory.

Raspberry Pi general optimization

  • Use a class 10 SD card for best speed. The USB bus can't come much higher than 30MB/s so you don't have to buy any extremely fast ones though. Not all cards are compatible, check the compatibility list: http://elinux.org/RPi_SD_cards
  • Use the HardFloat version of Raspbian instead of the SoftFloat. HF has much faster floating point operations - however SF is required for running Java. So it's either Java or performance, like normal.
  • The official Raspbian image gives low network speeds: http://elinux.org/RPi_Performance#NIC
  • A graphics driver by Simon / teh_orph is using hardware acceleration for some instructions: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=28294 installation instructions: http://elinux.org/RPi_Xorg_rpi_Driver
  • The firmware can be upgraded which gives, among other things, better GPU performance.
@bhang
bhang / install_graphite_statsd_ubuntu_precise.sh
Created May 15, 2012 17:41
Install Graphite and statsd on Ubuntu 12.04 LTS (Precise Pangolin)
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git
@jakemcgraw
jakemcgraw / facebook_gallery_downloader.js
Created June 7, 2011 23:52
Facebook Gallery Downloader
@jakemcgraw
jakemcgraw / hurdur.php
Created April 19, 2011 20:10
The hurdur templating engine for PHP
# hurdur.php
<?php
function hurdur_render($_template, array $params=array()) {
if (isset($params['_template'])) {
trigger_error('_template is reserved');
}
extract($params);
include $_template;
@billdawson
billdawson / Felixge_Faves.md
Created April 7, 2011 10:49
Felix Geisendörfer's favorite utils, from his tweet storm of 07 April 2011

Felix Geisendörfer's (@felixge) faves, and what he said about them in his tweets of 07 April 2011:

I really wonder how I was able to use Terminal app all this time. iTerm2 is so much better, it hurts. (#)

If you find yourself arranging windows with your mouse on osx,

@cowboy
cowboy / finder-open-iterm-here.scpt
Created April 6, 2011 12:10
Finder Open iTerm Here: Drop a folder on this script (or just run it) to open a new iTerm window there. If the selected item isn't a folder, it will open the item's parent folder. Great when bound to a hotkey in FastScripts or added to the Finder Sidebar
(*
* Finder Open iTerm Here - v1.0.2 - 4/14/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*)
tell application "Finder"
@nrk
nrk / NamespacingProfile.php
Created April 4, 2011 21:54
Namespace Redis keys transparently using Predis v0.6.x
<?php
namespace Predis;
class NamespacingProfile extends RedisServerProfile {
private $_prefix;
private $_profile;
private $_strategies;
public function __construct($prefix, $profile = 'default') {