Skip to content

Instantly share code, notes, and snippets.

View stenehall's full-sized avatar
🧗‍♂️

Johan Stenehall stenehall

🧗‍♂️
View GitHub Profile
<div id="grid" class="grid">
<div class="grid__element" style="flex-basis: 414.575px; flex-grow: 2.07287;">
<img src="https://farm2.staticflickr.com/1464/24962527114_f7e582daa5_b.jpg">
<div class="grid__title">
<p>DSC_4585</p>
</div>
</div>
<div class="grid__element" style="flex-basis: 336.449px; flex-grow: 1.68224;">
<img src="https://farm2.staticflickr.com/1587/25500055431_262305edbf_b.jpg">
<div class="grid__title">
@stenehall
stenehall / docker_build_and_push.sh
Last active September 18, 2015 22:09
Docker build and push commands
$ docker build -t our.docker.com/frontend:feature-adding-something .
$ docker push our.docker.com/frontend:feature-adding-something
@stenehall
stenehall / docker_push.sh
Last active September 18, 2015 22:11
Docker build and push script for package.json
DOCKER_TAG=`git rev-parse --abbrev-ref HEAD | sed 's/\\//-/g'` \
&& docker build -t our.docker.com/$DOCKER_TAG . \
&& docker push our.docker.com/$DOCKER_TAG \
&& echo "********************\n**\n**\n** ${DOCKER_TAG} \
pushed successfully time to deploy it\n**\n**\n \
********************"
if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?$1 last; }
var onLocked;
device.screen.on('off', function () {
onLocked = 0;
var now = new Date();
onLocked = new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), 0, 0);
});
device.screen.on("unlock", function(){
var timeDiff = Math.floor((new Date().getTime() - onLocked.getTime()) / 1000 ); // Minutes
RewriteEngine on
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
$("a[href$='pdf']").live('click', function() {
_gaq.push(['_trackEvent', 'PDF', 'Download', $(this).attr('href')]);
});
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
brew install bash-completion
CDPATH=$CDPATH:~/Sites/