most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
<!DOCTYPE html> | |
<!-- code below from http://stackoverflow.com/a/13709663/187468 --> | |
<html> | |
<head> | |
<title>Read File (via User Input selection)</title> | |
<script type="text/javascript"> | |
var reader; //GLOBAL File Reader object for demo purpose only | |
/** | |
* Check for the various File API support. |
147 total | |
# root@li496-11(pts/0) ~ | |
tcpdump -nn -i any -s0 -e -A -r /tmp/phantomjs.pcap | grep Host | sort | uniq -c | sort -n | |
reading from file /tmp/phantomjs.pcap, link-type LINUX_SLL (Linux cooked) | |
1 Host: 289-tsc-352.mktoresp.com | |
1 Host: dnn506yrbagrg.cloudfront.net | |
1 Host: googleads.g.doubleclick.net | |
1 Host: munchkin-cdn.marketo.net | |
1 Host: munchkin.marketo.net | |
1 Host: p.jwpcdn.com |
74 total | |
# root@li496-11(pts/0) ~ | |
tcpdump -nn -i any -s0 -e -A -r /tmp/ibm.pcap | grep Host | sort | uniq -c | sort -n | |
reading from file /tmp/ibm.pcap, link-type LINUX_SLL (Linux cooked) | |
1 Host: data.cmcore.com | |
1 Server: AkamaiGHost | |
2 Host: libs.coremetrics.com | |
2 Host: service.maxymiser.net | |
2 Host: tmscdn.coremetrics.com | |
3 Host: consent.truste.com |
76 total | |
# root@li496-11(pts/0) ~ | |
tcpdump -nn -i any -s0 -e -A -r /tmp/gemalto.pcap | grep Host | sort | uniq -c | sort -n | |
reading from file /tmp/gemalto.pcap, link-type LINUX_SLL (Linux cooked) | |
1 Host: blog.gemalto.com | |
1 Host: content.mkt51.net | |
1 Host: p.typekit.net | |
2 Host: fr.sitestat.com | |
5 Host: use.typekit.net | |
65 Host: www.gemalto.com |
# root@li496-11(pts/0) ~ | |
ll -h /tmp/*pcap | |
-rw-r--r-- 1 root root 4.3M Jul 25 17:36 /tmp/gemalto.pcap | |
-rw-r--r-- 1 root root 8.0M Jul 25 17:28 /tmp/hid.pcap | |
-rw-r--r-- 1 root root 1.2M Jul 25 17:34 /tmp/ibm.pcap |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
// Ensure url has 'www' and uses SSL | |
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && ($_SERVER['PANTHEON_ENVIRONMENT'] === 'live') && | |
(php_sapi_name() != "cli")) { | |
$do_redirect = FALSE; | |
$url_chunks = explode('.', $_SERVER['HTTP_HOST']); | |
if ($url_chunks[0] != 'www') { | |
array_unshift($url_chunks, 'www'); | |
$do_redirect = TRUE; | |
} | |
if (strtolower($_SERVER['HTTPS']) != 'on') { |
/** | |
* param {String} sessionId | |
* param {String} bs_id | |
* param {String} sitename | |
* param {String} action_var_name | |
* param {String [][] } attr sets of attributes to set. Format: [[docnum, varname, value], [docnum, varname, value]...] | |
* param {String} error_string | |
* | |
* return {String} the soap response | |
*/ |
#!/bin/bash | |
## in .bash_profile | |
SSHAGENT=`which ssh-agent` | |
SSHAGENTARGS="-s" | |
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
eval `$SSHAGENT $SSHAGENTARGS` | |
trap "kill $SSH_AGENT_PID" 0 | |
fi |