This file contains hidden or 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
// Expects jquery objects | |
function swapSiblingNodes($a, $b) { | |
var a = $a[0]; | |
var b = $b[0]; | |
var aparent= a.parentNode; | |
var asibling= a.nextSibling===b? a : a.nextSibling; | |
b.parentNode.insertBefore(a, b); | |
aparent.insertBefore(b, asibling); | |
} |
This file contains hidden or 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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_explorer" } | |
] |
This file contains hidden or 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
.group:before, | |
.group:after { | |
content: ""; | |
display: table; | |
} | |
.group:after { | |
clear: both; | |
} |
This file contains hidden or 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
//Based off of http://css-tricks.com/media-queries-sass-3-2-and-codekit/ | |
@mixin bp-min-width($point) { | |
@media (min-width: $point) { @content; } | |
} | |
@mixin bp-max-width($point) { | |
@media (max-width: $point) { @content; } | |
} | |
//Order matters for this plugin as it is currently written | |
@mixin bp($point) { |
This file contains hidden or 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 | |
# | |
find . -type f -exec grep -i "$1" {} \; -print |
This file contains hidden or 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 | |
#First we make sure they have input a parameter for the program to encrypt | |
if [ "$1" = "" ]; then | |
echo Must have a file to encrypt | |
exit | |
fi | |
echo Please, enter your password | |
#stty turns on and off a type of output. We don't want the password to be in clear text so we disable it with "stty -echo". Aftwards we return the output to it's orginal state with "stty $stty_orig". | |
stty_orig=`stty -g` | |
stty -echo |
This file contains hidden or 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 jQueryScriptOutputted = false; | |
function initJQuery() { | |
//if the jQuery object isn't available | |
if (typeof(jQuery) == 'undefined') { | |
if (! jQueryScriptOutputted) { | |
//only output the script once.. | |
jQueryScriptOutputted = true; | |
This file contains hidden or 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
You can set the perms using the --chmod parameter e.g. | |
rsync --verbose --delete --recursive -p --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r /cygdrive/c/src/ user@host:~/src/ | |
will force the permissions to be set to 755 for Directories and 644 for Files. | |
See https://serverfault.com/questions/233567/how-to-set-file-folder-permissions-using-rsync-from-windows-to-linux/233586#233586 though his code didn't work correctly for me. Needed to specify the directory and folder (F & D) on the group and others (go). |
This file contains hidden or 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
//Media query logic modifed from Zurbs Foundation framework | |
$breakpoint-small-max: 600; | |
$breakpoint-medium-max: 1000; | |
$breakpoint-large-max: 1339; | |
$breakpoint-xlarge-max: 1600; | |
$breakpoint-xxlarge-max: 9999999999; | |
@function lower-bound($range){ | |
@if length($range) <= 0 { | |
@return 0; | |
} |
This file contains hidden or 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
//Transforms array a into the value of b while maintaining the original reference of a. Useful for updating synced arrays | |
function arrayTransform(a,b){ | |
var old = a.slice(); | |
b.forEach(function(i){ | |
if(a.indexOf(i) === -1){ | |
a.push(i); | |
} | |
}); |
OlderNewer