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 -r 'eval(file_get_contents("https://api.wordpress.org/secret-key/1.1/salt/"));foreach(explode(" ","AUTH_KEY AUTH_SALT LOGGED_IN_KEY LOGGED_IN_SALT NONCE_KEY NONCE_SALT SECURE_AUTH_KEY SECURE_AUTH_SALT")as$n){echo "WP_{$n} = '\''".constant($n)."'\''".PHP_EOL;}' |
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
-- Get the currently selected item | |
tell application "Finder" | |
set currentFile to selection as text | |
end tell | |
set container to GetParentPath(currentFile) | |
display dialog "File name and extension" default answer "New File.txt" | |
set fileName to text returned of result |
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 | |
// Wordfence Cache Workaround | |
// Apache 2.4.? - 2.4.8 contains a bug between mod_dir and mod_rewrite that prevents Wordfence's Falcon | |
// caching from working on the homepage, but just the homepage. This is a workaround for that issue. | |
$targetDomain = 'www.yourdomain.com'; | |
// We'll need to check cookie existence to determine if the visitor is logged in. Some WP cookie names | |
// include a unique hash at the end, so we'll need to check by collecting all the cookie names, and | |
// passing them through a regex. |
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
# Annoying Files | |
.AppleDouble | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 | |
.Trashes | |
Icon^M^M | |
Thumbs.db | |
ehthumbs.db |
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 | |
// Todo | |
// - Add arrary-like iterating capabilities | |
class Repository | |
{ | |
protected $attributes = array(); | |
public function __construct(array $attributes = array()) |
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 time_to_seconds($time = 0) | |
{ | |
list($secs, $mins, $hours) = array_pad(array_reverse(explode(':', $time)), 3, 0); | |
return ($hours * 3600) + ($mins * 60) + $secs; | |
} |
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
on run | |
tell application "Numbers" to tell front document | |
set tPath to (POSIX file (get path)) as string | |
tell tPath to if it ends with ".numbers" then set tPath to text 1 thru -9 -- remove extension | |
save as "LSDocumentTypeCSV" in file tPath -- Numbers automatically adds the ".csv" | |
end tell | |
return tPath as alias -- return the path of the CSV file to the next action | |
end 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
tell application "ScreenSaverEngine" to activate |