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 | |
// redirects and failed login attempts to the FBI cyber intelligence thingy | |
// adapted from http://css-tricks.com/snippets/htaccess/shock-teenage-gangsters-with-wp-config-redirect/ | |
add_filter('login_redirect', 'catch_login_error', 10, 3); | |
function catch_login_error($redir1, $redir2, $wperr_user){ | |
if(!is_wp_error($wperr_user) || !$wperr_user->get_error_code()) return $redir1; | |
switch($wperr_user->get_error_code()){ | |
case 'incorrect_password': | |
case 'empty_password': | |
case 'invalid_username': |
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 | |
// better WordPress excerpts | |
// Usage: echo get_excerpt(250); (replace 250 with the number of characters) | |
function get_excerpt($count) { | |
$excerpt = get_the_content(); | |
$excerpt = strip_tags($excerpt); | |
$excerpt = strip_shortcodes($excerpt); | |
$excerpt = substr($excerpt, 0, $count); | |
$excerpt = rtrim($excerpt, '.'); |
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
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
less: { | |
production: { | |
files: { | |
"library/less/bootstrap.less": "library/css/bootstrap.css" | |
} | |
} | |
}, |
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 "Google Chrome" | |
activate | |
open location "chrome-extension://hdahlabpinmfcemhcbcfoijcpoalfgdn/AirMech.html#" | |
end tell |
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
(* | |
Inscructions: | |
Change Safari to your selection of browser | |
Change nameOrIDofButton to the ID or Name of the button to be selected, find this in your dev tools. If you don't know what this es, you probably shouldn't try to use this | |
Then replace http://example.com with the url you want to be refreshed | |
*) | |
repeat 3 times | |
tell application "Safari" | |
do JavaScript "document.all(\"nameOrIDofButton\").click()" in document 1 | |
delay 1 |
NewerOlder