Skip to content

Instantly share code, notes, and snippets.

@rocketnova
rocketnova / main.css
Last active August 29, 2015 14:26
Flexbox: sticky footer without vh
html, body {
height: 100%;
}
body {
margin: 0;
color: white;
}
.container {
@rocketnova
rocketnova / main.css
Last active August 29, 2015 14:26
Flexbox: Independent scroll with sticky footer
body {
margin: 0;
color: #fff;
}
.container {
display: flex;
overflow: hidden;
height: 100vh;
}
@rocketnova
rocketnova / tm2iterm.rb
Created June 19, 2012 20:45 — forked from maxim/tm2iterm.rb
Convert TextMate themes into iTerm 2 color schemes.
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
var columnSort = function() {
// Column counting wrapping thing
var itemCount = $('css declaration to find parent views-row').length;
var column1 = $('<div></div>').appendTo('put it somewhere');
$('css declaration to find parent views-row').each(function(index) {
if (soething to fingure out which column) {
$(this).appendTo(column1); or
$(this).remove().appendTo(column1); or
@rocketnova
rocketnova / Display Views context display programmatically
Created November 25, 2010 17:58
Display Views context display programmatically
$view = views_get_view('plays');
$view->init_display('ctools_context_1');
$plays = $view->execute_display('ctools_context_1', array($generative_artist));
foreach($plays['view']->result as $each_play) {
// do stuff
}
$view2 = views_get_view('events');
$view2->set_display('panel_pane_3');
$view2->set_arguments(array($all_plays_arg));
$events = $view2->preview();
$output = $events;