Skip to content

Instantly share code, notes, and snippets.

View jlong's full-sized avatar
🚀

John W. Long jlong

🚀
View GitHub Profile
@jlong
jlong / irb
Created January 21, 2010 02:50
$ script/console
Loading development environment (Rails 2.3.2)
>> Sass::Plugin.options
=> {:css_location=>"/Users/jlong/Workspaces/groupstory/application/public/stylesheets", :template_location=>"/Users/jlong/Workspaces/groupstory/application/public/stylesheets/sass", :always_update=>true, :always_check=>true, :style=>:expanded, :cache_location=>"/Users/jlong/Workspaces/groupstory/application/tmp/sass-cache", :line_numbers=>true, :full_exception=>true}
/*
Inline-block for IE6, Firefox 2, and up
via http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block
*/
@module inline-block {
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
require "rubygems"
require "rack"
require "rack/lobster"
app = Rack::Builder.new do
use Rack::ShowExceptions
run Rack::Lobster.new
end
webrick = Rack::Handler.get('webrick')
#\ -p 4000
gem 'activesupport', '2.3.5'
gem 'serve', '0.11.2'
require 'serve'
require 'serve/rack'
root = File.dirname(__FILE__)
http_path = "/"
http_stylesheets_path = "/stylesheets"
http_images_path = "/images"
http_javascripts_path = "/javascripts"
sass_dir = "sass"
css_dir = "public/stylesheets"
images_dir = "public/images"
javascripts_dir = "public/javascripts"
<html>
<head>
<title>Hello World!</title>
<link rel="stylesheet" href="styles.sass" type="text/css" media="screen" />
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
' $DYNAMIC
DEFINT A-Z
DECLARE SUB GLoad (FileName AS STRING, GLoadArray() AS INTEGER)
DECLARE SUB GSave (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, FileName AS STRING)
DECLARE SUB DoWarHead ()
DECLARE SUB DrawWarHead (X AS INTEGER, Y AS INTEGER)
DECLARE SUB DoLasers ()
DECLARE SUB AddLaser (X AS INTEGER, Y AS INTEGER, Speed AS INTEGER, typ AS INTEGER, c AS INTEGER)
DECLARE SUB KillLaser (ID AS LONG)
DECLARE SUB PlayGame ()
@jlong
jlong / example.html
Created September 23, 2010 23:34
A nice multi-line button mixin for Sass and Compass
<p>
<a href="/signup/" class="multiline_button blue" style="width: 245px">
<big>Start Free Trial</big>
<small>30-days free! Signup in 60 seconds</small>
</a>
</p>
<p>
<a href="/signup/" class="multiline_button brown" style="width: 245px">
<big>Start Free Trial</big>
#\ -p 4000
PublicDir = File.join(Dir.pwd, 'public')
module Rack
# Route directory URI's to index file.
class DirectoryIndex
def initialize(app, index='index.html')
@app = app
@index = [index].flatten
@jlong
jlong / _multi-line-button.scss
Created October 20, 2010 15:45
Sass files converted to SCSS from the article: [Multi-line Buttons with Compass, Sass, and CSS3](http://wiseheartdesign.com/articles/2010/10/19/multi-line-buttons-with-compass-sass-and-css3/)
@mixin multi-line-button($base-color) {
@include background-clip("padding-box");
border-width: 1px;
@include border-radius(6px);
border-style: solid;
color: white;
display: block;
margin: 0.2em auto;
padding: 12px 15px;
text-align: center;