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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
var Nightmare = require("nightmare"); | |
var nightmare = new Nightmare(); | |
nightmare | |
.goto("https://non-existent-website-nifgeoawniogea.com") | |
.catch(handleError); | |
//Note: You can manually raise an exception from within a `.then()` command with a normal `throw new Error()`: | |
//throw new Error("Description of the error."); |
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
(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.9",releaseDate:"2013-10-18",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isIE11=g.indexOf("Trident/")!=-1&&(g.indexOf("rv:")!=-1||o.appName.indexOf("Netscape")!=-1);s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName)||s.isIE11;s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&!s.isIE11&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^htt |
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 | |
tput bel |
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 1 column, instead of 2 in line 3.
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
#Original Source: http://answers.google.com/answers/threadview/id/107201.html | |
# | |
#This data is all available in raw form from the United States Census | |
#Site, which is about as authoritative a source as you will get on the | |
#subject. I have used the following files: | |
# | |
#US Male Names: http://www.census.gov/genealogy/names/dist.male.first | |
#US Female Names: http://www.census.gov/genealogy/names/dist.female.first | |
#US Last Names: http://www.census.gov/genealogy/names/dist.all.last | |
# |
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
//Source data from http://answers.google.com/answers/threadview/id/107201.html | |
var male = ["abdul","abe","abel","abraham","abram","adalberto","adan","adolfo","adolph","agustin","ahmad","ahmed","al","alan","alberto","alden","aldo","alec","alejandro","alfonso","alfonzo","alfred","alfredo","allan","alonso","alonzo","alphonse","alphonso","alton","alvaro","alvin","amado","ambrose","amos","anderson","andreas","andres","andy","anibal","antione","antoine","anton","antone","antony","antwan","archie","arden","arlen","arlie","armand","armando","arnold","arnoldo","arnulfo","aron","arron","art","arturo","asa","august","augustus","aurelio","barney","barrett","barry","bart","barton","basil","beau","ben","benedict","benito","benjamin","bennett","benny","benton","bernard","bernardo","bert","bertram","bill","blaine","bo","bob","booker","boris","boyce","boyd","brad","bradford","bradley","bradly","brady","brain","branden","brant","brendan","brendon","brent","brenton","bret","brice","brock","broderick","brooks","bruce","bruno","b |
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
function contact_form_7_recaptcha_callback() { | |
jQuery(function($){ | |
$('.g-recaptcha-explicit-id').each(function(){ | |
$(this).data('grecaptcha_id', grecaptcha.render($('#' + this.value)[0], { | |
'sitekey' : contact_form_7_recaptcha_data.sitekey | |
})); | |
}); | |
}); | |
}; |
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 | |
//Adapted by rich at byu.net from https://www.damia.no/calculating-u-s-federal-holidays-with-php/ | |
class UsHolidays { | |
private $year; | |
private $list; | |
const ONE_DAY = 86400; //Number of seconds in one day | |
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 | |
/* | |
Plugin Name: Keep Query String | |
Description: Adds short URL query string, if any, to the long URL | |
Version: 0.1 | |
Author: Ozh | |
*/ | |
yourls_add_filter('redirect_location', 'ozh_kqs'); |
OlderNewer