Skip to content

Instantly share code, notes, and snippets.

@mattbanks
mattbanks / 0_reuse_code.js
Created September 29, 2015 19:04
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
@mattbanks
mattbanks / js-detectie
Created May 4, 2012 14:24 — forked from padolsey/gist:527683
JavaScript: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@mattbanks
mattbanks / gist:3004901
Created June 27, 2012 15:39 — forked from jchristopher/gist:2998780
AppleScript: iTerm tail PHP error log
tell application "iTerm"
activate
set t to (make new terminal)
tell t
tell (make new session at the end of sessions)
exec command "tail -f /Applications/MAMP/logs/php_error.log"
end tell
end tell
end tell
@mattbanks
mattbanks / gist:3379965
Created August 17, 2012 15:35 — forked from billerickson/gist:3379905
WordPress Security
WordPress is actually one of the most secure pieces of software available. It powers 17%
of the 1,000,000 most visited websites, so it is being constantly tested both internally
and by hackers. When an issue is discovered, an update is released which you can install
with one click in the dashboard.
The vast majority of hacked WordPress websites are running an out-of-date version of
WordPress. Once WordPress is updated, any vulnerabilities that are patched are now publicly
known, so old versions are vulnerable.
The next most likely source of hacking is your host. If your server isn't secure, it doesn't
@mattbanks
mattbanks / README.md
Created August 23, 2012 13:42 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@mattbanks
mattbanks / gist:3487914
Created August 27, 2012 12:13 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
#!/usr/bin/env ruby
# 1. export your RIL bookmarks
# 2. save this file to the same directory where your ril_export.html is
# 3. change username and password in the script bellow
# 4. run 'ruby ril_to_instapaper.rb' in terminal
require "cgi"
require "net/http"
require "net/https"
@mattbanks
mattbanks / Contract Killer 3.md
Created March 7, 2016 01:50 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post