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
#!/usr/bin/php | |
<?php | |
/** | |
* OS X Keychain Dump to JSON | |
* | |
* Big thanks to Romeo for outlining the initial steps for this: | |
* http://romeotheriault.blogspot.com/2009/01/exporting-mac-os-x-keychain-access.html | |
* | |
* Notes: |
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/sh | |
find . -maxdepth 100 -type f -exec mv {} /path/to/destination \ |
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 | |
defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto TMShowUnsupportedNetworkVolumes 1 |
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
<?php | |
array( | |
'AL' => 'Alabama', | |
'AK' => 'Alaska', | |
'AZ' => 'Arizona', | |
'AR' => 'Arkansas', | |
'CA' => 'California', | |
'CO' => 'Colorado', | |
'CT' => 'Connecticut', |
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
<?php | |
function flatten($record, $prepend = '', $delimiter = '.') | |
{ | |
$results = array(); | |
foreach ($record as $key => $value) | |
{ | |
if (is_array($value) or is_object($value)) | |
{ |
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
#<([a-z])[^(>|\/>)]*>(\s)*<\/\1[^>]*>#i |
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
# Scape a site w/ a few retries | |
wget -m -r --tries=5 "http://foo.bar" | |
# Scape a site w/o images | |
wget -m -r --tries=5 -R jpg,jpeg,png,gif,bmp "http://foo.bar" |
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
lsmod | grep vboxsf | |
sudo /etc/init.d/vboxadd setup |
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
<script> | |
// Detect if user agent is on a "touch" device | |
// http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript | |
function isTouchDevice() { | |
return !!('ontouchstart' in window) // works on most browsers | |
|| !!('onmsgesturechange' in window); // works on ie10 | |
} | |
if (isTouchDevice()) { | |
document.documentElement.className += ' touch'; |
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
:: Windows XP | |
rundll32.exe syssetup,SetupOobeBnk | |
:: Windows Vista or newer | |
slmgr –rearm |