Skip to content

Instantly share code, notes, and snippets.

View iammart's full-sized avatar

Mart Dingley iammart

View GitHub Profile
var COOKIE_NAME = 'iphone_redirect';
$go = $.cookie(COOKIE_NAME);
function appstore() {
var answer = confirm("Download the FREE \nTorbay Hotels App today")
if (answer) window.location = "http://itunes.apple.com/app/id532107287?mt=8";
$.cookie(COOKIE_NAME, 'notice', { path: '/', expires: 10})
}
@iammart
iammart / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@iammart
iammart / gist:8280288
Created January 6, 2014 09:31
[EXIM] Mail Queue
# Report
/usr/sbin/exim -bp | /usr/sbin/exiqsumm
# Remove all in queue
/usr/sbin/exim -bp | awk '/^ *[0-9]+[mhd]/{print "/usr/sbin/exim -Mrm " $3}' | bas
@iammart
iammart / gist:7869473
Last active December 30, 2015 18:48
Pens

Lead Holder

  • Staedtler Mars 780 Technical Mechanical Pencil, 2mm. 780BK

Lead Pointer

  • Alvin Rotary Lead Pointer (ANALP41)

Leads

  • Staedtler Mars Lumograph Leads 2B pack of 12

Eraser

@iammart
iammart / gist:6572530
Last active December 23, 2015 03:19
ATV1 OpenELEC XBMC 12.2 Frodo
@iammart
iammart / gist:5916493
Last active December 19, 2015 07:09
Exim commands

Remove all emails from the queue

$ /usr/sbin/exim -bp | /usr/sbin/exiqgrep -i | xargs /usr/sbin/exim -Mrm

Remove emails from a particular user

$ /usr/sbin/exiqgrep -i -f address.tld | xargs /usr/sbin/exim -Mrm

Freeze all queued mail from a sender

@iammart
iammart / Mail
Last active September 30, 2020 19:55
Mountain Lion Server
// Flush mail queue
$ sudo postfix flush
// Delete everything in the mail queue
$ sudo postsuper -d ALL
// See what's in the mail queue
$ sudo postqueue -p
// Stop mail
@iammart
iammart / gist:5531043
Created May 7, 2013 08:18
OSX Configs
// Disable shadows
defaults write com.apple.screencapture disable-shadow -bool TRUE
sudo killall SystemUIServer
// Change default save location
defaults write com.apple.screencapture location ~/Pictures/
// Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock