Skip to content

Instantly share code, notes, and snippets.

View llkats's full-sized avatar
💭
still affable

Lydia Kats llkats

💭
still affable
View GitHub Profile
@llkats
llkats / app.js
Created February 23, 2014 21:41
express app.js scaffold
var express = require('express');
var jade = require('jade');
var app = express();
var pub = __dirname + '/public';
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(app.router);
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}
@llkats
llkats / swallows
Created December 10, 2013 22:39
We asked meatspace: what is the airspeed velocity of an unladen swallow? These are the responses. Let's watch.
What do you mean? An African or European swallow?
an african or an european swallow?
Butts
25 mph
Derp. African or European. Must specify and make entire new site.
42
You have to know these things when you're a king, you know...
African, or European?
African or European?
100 petacoconuts/s
@llkats
llkats / meatdelay.js
Created December 1, 2013 05:26
Bookmarklet to delay the submission of a meatspace chat message for a bit.
(function() {
var WAITFORIT;
// style objects for styles bc lazy
var divstyles = {
'width' : '300px',
'height' : '150px',
'backgroundColor' : '#fff',
'position' : 'fixed',
@llkats
llkats / max-height.js
Created December 28, 2012 02:19
max height of a list
var maxheight = 0;
$.each($('#latest-carousel li'), function(i, val) {
maxheight = $(val).height() > maxheight ? $(val).height() : maxheight;
});
$('#carousel-mask').css('height', maxheight);
@llkats
llkats / gist:3981688
Created October 30, 2012 17:26 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@llkats
llkats / useragent.txt
Created July 11, 2012 22:40
mobile IE user agent string
Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; SGH-i917)
@llkats
llkats / placeholders.js
Created June 28, 2012 00:40
emulate placeholders in IE9 and other dumb browsers
// test to see if the browser supports native html5 placeholders
jQuery.support.placeholder = (function(){
var i = document.createElement('input');
return 'placeholder' in i;
})();
// if the browser doesn't support placeholders (IE9!!!!!!), do them manually
if (!$.support.placeholder) {
$("input").each(function(){
var current = $(this);
@llkats
llkats / index.css
Created June 20, 2012 00:21
force borders/padding to be calculated as part of 100% width
nav {
border: 4px solid #333;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
padding: 0 8px;
width: 100%
}
@llkats
llkats / index.css
Created June 18, 2012 21:24
list links in boxes; vertically centered text with one or two lines
li {
display: block;
height: 50px;
line-height: 50px; /* line-height is the same as the height of this element */
text-align: center;
width: 140px;
}
li a {
display: block; /* fills the li */