// jQuery
$(document).ready(function() {
// code
})
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
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
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
set guifont=Monaco:h16 | |
set transparency=0 |
This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.
I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)
Add the following lines to your .vimrc/_vimrc:
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/bash | |
adduser() | |
{ | |
if [ -z "$1" ] # Is parameter #1 zero length? | |
then | |
echo "-Parameters are zero length.-" # Or no parameter passed. | |
else | |
echo "-Parameter #1 is \"$1\".-" | |
fi |
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
/** | |
* cloneNode(true), but also clones shadow roots. | |
* @param {Element} | |
* @param {ShadowRoot[]} [shadowRoots] Any closed shadow roots passed here will be included. | |
*/ | |
function cloneWithShadowRoots(node, shadowRoots) { | |
function walk(node, clone) { | |
let shadow = node.shadowRoot || shadowRoots.find(r => r.host === node); | |
if (shadow) { | |
clone.attachShadow({ mode: shadow.mode }).append(...[].map.call(shadow.childNodes, c => c.cloneNode(true))); |