Skip to content

Instantly share code, notes, and snippets.

View plasticine's full-sized avatar
🐧
Hello? Is this thing on?

Justin Morris plasticine

🐧
Hello? Is this thing on?
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>nginx</string>
<key>Program</key>
<string>/usr/local/sbin/nginx</string>
<key>KeepAlive</key>
<true/>
@plasticine
plasticine / SCSS Sprite based nav.scss
Created May 9, 2011 01:43
Generates all the required classes, hover states and image offsets for sprite-based navigation.
@function sprite-ify($items, $height, $img, $offset:0){
display:block;
height:$height;
text-indent:-9999px;
background-color:transparent;
background-image:url($img);
@for $index from 1 through length($items) {
$item: nth($items, $index);
@if $index > 1 { $offset: $offset - nth(nth($items, $index - 1), 2); }
&.#{nth($item, 1)} {
<li>
<% editors = Editor.all() %>
<select class="<%= (editors.map(&:id).include?(params[:id].to_i)) ? 'active' : '' %>">
<option value="">filter</option>
<option value="everyone">everyone</option>
<% editors.sort_by(&:friendly_name).each do |editor| %>
<option value="<%= editor.id %>" <%= (params[:id] == "#{editor.id}") ? 'selected' : '' %>><%= editor.friendly_name %></option>
<% end %>
</select>
</li>
[2011-07-30 11:59:39,749: WARNING/MainProcess] celery@macchiato.local has started.
[2011-07-30 11:59:39,777: WARNING/MainProcess] Traceback (most recent call last):
[2011-07-30 11:59:39,777: WARNING/MainProcess] File "/Users/justin/Sites/_virtualenvs/cobracommander/bin/django-admin.py", line 5, in <module>
[2011-07-30 11:59:39,777: WARNING/MainProcess] management.execute_from_command_line()
[2011-07-30 11:59:39,778: WARNING/MainProcess] File "/Users/justin/Sites/_virtualenvs/cobracommander/lib/python2.7/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
[2011-07-30 11:59:39,778: WARNING/MainProcess] utility.execute()
[2011-07-30 11:59:39,778: WARNING/MainProcess] File "/Users/justin/Sites/_virtualenvs/cobracommander/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
[2011-07-30 11:59:39,778: WARNING/MainProcess] self.fetch_command(subcommand).run_from_argv(self.argv)
[2011-07-30 11:59:39,779: WARNING/MainProcess] File "/Users/justin/Sit
@plasticine
plasticine / grid.scss
Created August 15, 2011 01:49
Generate a grid.
$grid_col_names:(
'one', 'two', 'three', 'four', 'five', 'six',
'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve'
);
@function col($count:1){ @return (($grid_col_width + $grid_gutter) * $count) - $grid_gutter; }
@mixin pre_col($count:1){ margin-left: col($count); }
@mixin post_col($count:1){ margin-right: col($count); }
@mixin make_grid_classes{
@for $index from 1 through $grid_num_cols {
postForm: =>
# serialize and send the form to CM
# `url` will be `http://theconversation.createsend.com/t/r/s/foo`
url = "#{@form.attr('action')}?callback=?"
@showLoader( =>
$.getJSON(
url,
@form.serialize(),
(data) =>
@hideLoader()
sudo easy_install-2.6 pyobjc==2.2
@module = (names, fn) ->
names = names.split '.' if typeof names is 'string'
space = @[names.shift()] ||= {}
space.module ||= @module
if names.length
space.module names, fn
else
fn.call space
@plasticine
plasticine / gist:3375133
Created August 17, 2012 01:31
Icon Fontin’
// Generic icon set using custom font face for glyphs
//
// .icon-myicon - This is my cool icon
//
// Styleguide 5.1
[class^="icon-"], [class*=" icon-"]{
font-family: "TCFont-Regular";
display: inline-block;
font-weight: normal !important;
font-style: normal !important;
@plasticine
plasticine / gist:3485504
Created August 27, 2012 04:20
CI Frontend Stats
require 'chrome_debugger'
require 'librato/metrics'
LIBRATO_PREFIX = "tc.frontend"
LIBRATO_USER = ENV["LIBRATO_USER"]
LIBRATO_KEY = ENV["LIBRATO_KEY"]
PAGES = {
google: 'http://google.com/',
yahoo: 'http://yahoo.com/'
nytimes: 'http://nytimes.com'