Skip to content

Instantly share code, notes, and snippets.

📟
.... .- -.-. -.- / - .... . / .--. .-.. .- -. . -

Matt Walters mwalters

📟
.... .- -.-. -.- / - .... . / .--. .-.. .- -. . -
Block or report user

Report or block mwalters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View search.js
var idx = null;
var resultDetails = [];
var $searchResults;
var $searchInput;
var $headerSearch;
window.onload = function () {
var request = new XMLHttpRequest();
var query = '';
@mwalters
mwalters / Contract Killer 3.md
Last active Aug 29, 2015 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

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

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View keybase.md

Keybase proof

I hereby claim:

  • I am mwalters on github.
  • I am mwalters (https://keybase.io/mwalters) on keybase.
  • I have a public key ASAQVv2A6RsGKKnexzIGfI_xQbLWw1kK8gmLYYhTo6Cj-Qo

To claim this, I am signing this object:

@mwalters
mwalters / wp-upgrade.sh
Created Sep 24, 2013
Updates WordPress submodule tag (for upgrading WP core when it is a submodule)
View wp-upgrade.sh
tag_version="$1"
cd wp && git fetch --tags && git checkout $tag_version && cd .. && git add wp && git commit -m "Updates WordPress to version: $tag_version" && git push
@mwalters
mwalters / routing.php
Created Aug 27, 2013
Snippet: Poor Mans PHP Routing
View routing.php
<?php
// CONFIG: Path to Controllers, including trailing slash
$contollerPath = './Controllers/';
// If there is a query string, then get its position so it can be separated from the Controller/Method requested
if (strpos($_SERVER['REQUEST_URI'], '?')) {
$queryOffset = strpos($_SERVER['REQUEST_URI'], '?') - ($_SERVER['REQUEST_URI'] + 1);
} else {
$queryOffset = strlen($_SERVER['REQUEST_URI']);
View css-clear-fix.css
/* For modern browsers */
.cf:before,.cf:after {content:"";display:table;}
.cf:after {clear:both;}
/* For IE 6/7 (trigger hasLayout) */
.cf {zoom:1;}
@mwalters
mwalters / jquery-crash-course.md
Last active May 22, 2019
A friend needed a crash course in jQuery basics. I thought it might be helpful to capture it. Feel free to suggest corrections / modifications / additions.
View jquery-crash-course.md

Ok, crash course in jQuery and stuff:

Accessing jQuery

jQuery makes a global object, typically referenced by "$". There's also something called no-conflict mode where you'd reference it by "jQuery", but you won't see that too often in what we're doing, but just in case you encounter it, essentially these are the same:

$('.article')
jQuery('.article')

Element Selection

@mwalters
mwalters / tsping.sh
Last active Dec 10, 2015
Ping a provided hostname/IP and show a timestamp along with the ping response
View tsping.sh
ping -i 5 $1 | while read pong; do echo "$(date '+%Y-%m-%d %T'): $pong"; done
@mwalters
mwalters / grammar-reminders.md
Last active May 16, 2016
Grammar Reminders
View grammar-reminders.md

Grammar Reminders

Em, En, and Hyphen

Em Dash (—)

  • Denotes a pause in thought, a parenthetical statement, or — more casually — an afterthought
  • Shift + Option + -

En Dash (–)

  • Denotes a range, especially of numbers, such as $100–150
You can’t perform that action at this time.