var createNamedParameters = require("./named-parameters")
var fn = createNamedParameters(["greeting", "person"], function(a, b) {
console.log(a, b)
})
fn.greeting("hello") // set a
fn.person("world") // set b
fn() // console.log gets run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo | |
k$ | |
[a-f]{4} | |
(...).*\1 | |
^(?!.*(.)(.)\2\1) | |
^(.)(.).*\2\1$ | |
^(?!(xx+)\1+$) | |
(.)(.\1){3} | |
^.{5}[^e]?$ | |
^(([147]4|40|3[269]|9[05]|[378]1).+|0[369]*|[81][257])*$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Clear up the log of any database added to the index before committing it. | |
git diff-index --name-only --cached HEAD \ | |
| grep -e "database/.*\.db" \ | |
| while read DB; do | |
echo "Truncating log table in database: $DB" | |
sqlite3 "$DB" "DELETE FROM bolt_log; VACUUM;" | |
git add "$DB" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body::before { | |
content: ""; | |
height: 6px; | |
background-color: #8cc84b; | |
position: fixed; | |
left: 0; | |
right: 0; | |
top: 0; | |
} |
- Wait until at least April, when the ground softens.
- Dress warmly (think layers), bring a shovel and a lantern on a stick.
- Listen. Is someone coming?
- Cover your lantern with a blanket, wait.
- Continue. If you're not used to hard physical labor, wear weight-lifting gloves to avoid excess chafing.
- You may need a wheelbarrow. You probably should have brought a wheelbarrow.
- Come back with a wheelbarrow.
- Try to have the body you've always wanted back to your house by dawn.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Highlight words containing github. | |
$("#content p").highlight("github"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" =============================================== | |
" _ __(_)__ _ ________ | |
" _| |/ / // ' \/ __/ __/ | |
" (_)___/_//_/_/_/_/ \__/ | |
" | |
" Maintainer: Matthew Pietz | |
" | |
" =============================================== | |
" Put your overrides in here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.expr[':'].external = function(obj) { | |
return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname); | |
}; | |
// Add class to all external links | |
$('a:external').addClass('external'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#kill-defaults | |
> Each command is defined on a single line comprised of: | |
> | |
> 1. a case-insensitive, alpha-numeric trigger followed | |
> by whitespace | |
> 2. a url followed by whitespace (if the url contains | |
> spaces they must be encoded as `%20`) | |
> 3. a short description | |
> | |
> Urls may contain the following replacement tokens: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################# | |
# Migrate User Credentials | |
# | |
# @author Matthew Pietz | |
Mode=0 | |
BackupPath="/tmp/user-mig.$$" | |
StorageFile="user-migrate.tar.gz" | |
StartID=1000 |