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
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 |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
/* | |
Author: Gary Clayburg | |
This file allows IntelliJ IDEA to perform basic syntax checking and code completion for | |
Jenkins workflow groovy scripts. https://github.com/jenkinsci/workflow-plugin | |
These methods are supported | |
sh | |
readFile | |
node | |
echo |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.