Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Stefan Imhoff kogakure

🏠
Working from home
View GitHub Profile
@kogakure
kogakure / fabfile.py
Created Apr 22, 2010 — forked from jsmits/fabfile.py
Python: Deployment with Fabric
View fabfile.py
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
View date.format.js
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
@kogakure
kogakure / .prettierrc.json
Created Feb 19, 2018
Overriding prettier rules for specific file types
View .prettierrc.json
{
"singleQuote": true,
"trailingComma": "es5",
"overrides": [
{
"files": "**/*.css",
"options": {
"singleQuote": false
}
}
@kogakure
kogakure / settings.py
Created Dec 9, 2008
Python: Django Templates: settings.py, local_settings.py
View settings.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os.path
import sys
# Basic Settings
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
PROJECT_NAME = os.path.split(PROJECT_ROOT)[-1]
MEDIA_ROOT = '%s/media/' % PROJECT_ROOT
@kogakure
kogakure / gist:6172657
Created Aug 7, 2013
CSS: Mask with -webkit-mask and adding a border with second mask
View gist:6172657
<div>
<img class="cutout" src="http://jedidiah.eu/code/css/masks/images/periwinkle.jpg" alt="">
</div>
@kogakure
kogakure / gist:6595093
Created Sep 17, 2013
HTML/CSS: Intrinsic Ratios image solution for responsive images
View gist:6595093
<div class="img-container">
<img src="http://cdn3.spiegel.de/images/image-545702-breitwandaufmacher-penw.jpg">
</div>
@kogakure
kogakure / gist:205825
Created Oct 9, 2009
Bash: Git – Rename an email address in all old commits.
View gist:205825
# Rename an email address in all old commits.
# WARNING: Will change all your commit SHA1s.
# Based off of the script from here:
# http://coffee.geek.nz/how-change-author-git.html
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "joern.zaefferer@googlemail.com" ];
then
GIT_AUTHOR_EMAIL="joern.zaefferer@gmail.com";
GIT_COMMITTER_EMAIL="joern.zaefferer@gmail.com";
git commit-tree "$@";
@kogakure
kogakure / article.md
Last active Mar 19, 2017
Hugo: Shortcode for loading Flickr images over JSON into blog post
View article.md
title date
How get Flickr images into Hugo
2016-09-03 14:15:19 +0200

{{% flickr_gallery "72157656063987631" %}}

View box-sizing.css
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
@kogakure
kogakure / index.html
Created Dec 28, 2016
Inline SVG Demo 2
View index.html
<main class="Demo bg-image">
<div class="Modal">
<h2>Sign In</h2>
<form class="Form">
<label class="Label">
<input class="Input" type="text"
placeholder="Username" name="username"
required minlength="4">