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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>jQuery snippets</title> | |
</head> | |
<body> | |
<script src="jquery-1.11.3"></script> | |
<script> |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
.sharp-pixels { | |
-ms-interpolation-mode: nearest-neighbor; /* IE */ | |
image-rendering: -moz-crisp-edges; /* Firefox */ | |
image-rendering: -webkit-optimize-contrast; /* Safari */ | |
image-rendering: pixelated; /* Chrome and Opera */ | |
} |
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
#create a new MySQL database | |
drush si -y --db-url=mysql://root:root@localhost/new_database |
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
<script type="text/javascript" src="http://cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js"> | |
</script> | |
<div id="link"> | |
<a href="link1">1</a> | |
<a href="link2">2</a> | |
<a href="link3">3</a> | |
</div> | |
<div id="details"></div> |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.1/angular.min.js"></script> | |
<script>window.angular || document.write('<script src="js/lib/angular/angular.min.js"><\/script>')</script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.1/angular.min.js"></script> | |
<script>window.angular || document.write('<script src="js/lib/angular-ui-router/release/angular-ui-router.min.js"><\/script>')</script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> |
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
git clone https://gist.github.com/a9996faa66c13cc78904.git && cd a9996faa66c13cc78904 && mv .gitignore .. && cd .. && rm -rf a9996faa66c13cc78904 |
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
if(screen.width > 600 && document.documentElement.clientWidth > 600) { | |
// dont run for smaller screens | |
} |
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
// Modernizr Media Queries | |
if(Modernizr.mq('only all and (max-width: 400px)')) { | |
// Do stuff for mobile | |
} else { | |
// Do stuff for desktop | |
} |