Skip to content

Instantly share code, notes, and snippets.

View kogakure's full-sized avatar
🏠
Working from home

Stefan Imhoff kogakure

🏠
Working from home
View GitHub Profile
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px) {
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width: 321px) {
}
@kogakure
kogakure / index.html
Created August 8, 2013 12:37
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@kogakure
kogakure / gist:6163186
Last active December 20, 2015 16:39
CSS: Create Masks in WebKit (with pulse)
<img class="cutout pulse" src="http://jedidiah.eu/code/css/masks/images/periwinkle.jpg" alt="">
@kogakure
kogakure / gist:6154777
Last active December 20, 2015 15:29
CSS: Clamp content to a specific count of lines (Weird WebKit Flexbox Way)
/**
* Clamp content to a specific count of lines (Weird WebKit Flexbox Way)
* http://css-tricks.com/line-clampin/
*/
p { padding: 0; margin: 0; }
.module {
border: 1px dotted black;
width: 500px;
@kogakure
kogakure / screenshot.js
Created July 11, 2013 13:54
JavaScript: Create Responsive Screenshots of a webpage
/*
* http://net.tutsplus.com/tutorials/javascript-ajax/responsive-screenshots-with-casper/
*
* INSTALL:
* brew install phantomjs
* brew install casperjs
*
* RUN:
* casperjs screenshot.js http://todomvc.com
*/
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@kogakure
kogakure / myip
Created June 3, 2013 10:36 — forked from warthurton/myip
#!/bin/bash
active_interface=`netstat -rn | grep 'default' | awk '{print $6}'`
ifconfig | grep -A 1 $active_interface | grep 'inet ' | awk '{printf $2}'
@kogakure
kogakure / dabblet.css
Last active December 16, 2015 08:19
CSS/Markup: Flexbox
/**
* CSS/Markup: Flexbox
*/
article {
margin-bottom: 20px;
}
article > div {
display: -webkit-flex;
[alias]
ready = init
some = clone
down = pull
up = push
lost = stash
found = stash pop
overit = stash clear
in = add
out = rm
@kogakure
kogakure / gist:5143767
Created March 12, 2013 15:17
Vim: Easy Vim session management
" http://connermcd.com/blog/2013/03/11/easy-vim-session-management/
"
" Make a session: :Mks
" Load a session: source my-session-file.session
command! Mks let g:session = getcwd() <bar> call Mks(g:session)
augroup vimrc
au!
au BufRead *.session let g:session = expand('%:p:h') | so % | bd #