Skip to content

Instantly share code, notes, and snippets.

View listrophy's full-sized avatar

Brad Grzesiak listrophy

View GitHub Profile
<div id="article-body">
<p style="text-align: left">
<img alt="" src="/Restaurant%20Week/RW%202012%20Summer/RWS12-1.jpg" style="width: 610px; height: 200px"></p>
<h1 style="text-align: center">
<font color="#000000">             43 North<a href="http://www.madisonmagazine.com/Madison-Magazine/Events/Restaurant-Week/Participants/Avenue/"><img alt="" src="/Restaurant%20Week/RW%20WINTER/Left.jpg" style="width: 100px; height: 30px"></a></font>
</h1>
<p style="text-align: center">
<font color="#339999">108 King Street Madison 53705 608.255.4343 Hours: Mon-Sun 5-10p</font><font color="#339999"> <a href="http://43north.biz/" target="_blank"><font color="#339999">Website</font></a></font></p>
<h3 style="text-align: center">
<font color="#336666">Dinner Menu</font>
<!DOCTYPE html>
<html>
<head>
<%= stylesheet_link_tag 'tt_report', :plugin => 'redmine_time_tracker', :media => "all" %>
<%= javascript_include_tag 'mootools/mootools-core-1.4.5-full-compat-yc.js', :plugin => 'redmine_time_tracker' %>
<%= javascript_include_tag 'mootools/mootools-more-1.4.0.1.js', :plugin => 'redmine_time_tracker' %>
<%= javascript_include_tag 'MilkChart.yc.js', :plugin => 'redmine_time_tracker' %>
</head>
<body>
<table style="width: 100%;">
@listrophy
listrophy / main_screen.coffee
Created September 25, 2012 19:31
Singleton class in Coffeescript
MainScreen = new class extends Screen
doSomething: (window) ->
window.buttons()[0].tap()
@listrophy
listrophy / gist:3827302
Created October 3, 2012 14:45
TravisCI.app endpoints
honor TravisCI(原+*-) ack -ua 'json' TravisCI
TravisCI/BWBuild+Presenter.m
22: NSString *resourcePath = [NSString stringWithFormat:@"/builds/%@.json", self.remote_id];
TravisCI/BWJob+Presenter.m
142: NSString *resourcePath = [NSString stringWithFormat:@"/jobs/%@.json", self.remote_id];
TravisCI/BWRepository+Presenter.m
21: NSString *resourcePath = [NSString stringWithFormat:@"/repositories/%@.json", remote_id];
31: NSString *resourcePath = [NSString stringWithFormat:@"/repositories/%@/builds.json", self.remote_id];
@listrophy
listrophy / mockingbird.rb
Created October 9, 2012 23:20
Mockingbird example
class Mockingbird < ActiveRecord::Base
attr_accessible :color
def chirp!
"chirp"
end
def tweet!
"tweet"
end
@listrophy
listrophy / head.html
Created October 18, 2012 00:42
OMG! You Gotta See HTML
<head>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='on' http-equiv='cleartype'>
<title>Omg</title>
<meta content='True' name='HandheldFriendly'>
<meta content='320' name='MobileOptimized'>
<meta content='width=device-width, initial-scale=1' name='viewport'>
<meta content='' name='description'>
<link href="/assets/application-[hash].css" media="all" rel="stylesheet" type="text/css" />
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=local
@listrophy
listrophy / Custom.css
Created January 3, 2013 15:40
Put this in "~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css" to highlight your blocked stories.
.projects_stories_page .storyLabels a[title="blocked"] {
background-color: red;
color: white !important;
padding: 0 3px;
display: inline-block;
}
@listrophy
listrophy / Rakefile
Created January 21, 2013 19:57
Rakefile + watchr script for asset compilation (kinda specialized for http://restaurantweekmap.com)
require 'yaml'
require 'active_support/core_ext/object'
desc 'Compile all the things'
task :compile => 'compile:all'
SASS_FILES = FileList['sass/*.{sass,scss}']
COFFEE_FILES = FileList['coffee/*.coffee']
JS_FILES = COFFEE_FILES.pathmap('tmp/js/%n.js')
@listrophy
listrophy / project_lookup_constraint.rb
Created March 6, 2013 21:43
GitHub-style URL matching, with only one query. Is this belt-and-suspenders if ActiveRecord caches the query?
class ProjectLookupConstraint
def matches? request
Project.where(request.params.slice(:account_name, :project_name)).first.tap do |project|
request.flash.now['project'] = project
end
end
end