Skip to content

Instantly share code, notes, and snippets.

View Auraelius's full-sized avatar

Al Zimmerman Auraelius

  • Pragmatic Design Studio
  • Portland, OR
  • X @auraelius
View GitHub Profile
@Auraelius
Auraelius / gist:7eedd27d1c8c9b38bd3c
Created May 8, 2015 01:57
How to run Sublime Text from the command line on OSX
# this is a comment
#
# "mkdir ~/bin" makes a "bin" folder in your home folder. this is a good place to put your own programs
# "rm ~/bin/subl" removes any "subl" command that you might already have
# 'ln -s "/Appli...."' links "subl" to the app in your Applications folder
# cut and paste these commands into your terminal shell:
mkdir ~/bin
rm ~/bin/subl
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<style>
body {
font-family: "Open Sans", sans-serif;
}
</style>
</head>
@Auraelius
Auraelius / js-jq-assignment-1-template.html
Created February 16, 2015 21:11
JavaScript / jQuery assignment template file
<html>
<head>
<title>JavaScript &amp; jQuery Example</title>
<!--
We put the styles here just to keep the assignment all in one file.
Normally they go in separate files.
-->
<style type="text/css">
@Auraelius
Auraelius / gist:e852192fb062c0d9218b
Created October 27, 2014 19:52
;fldksjf;sadlkfj;lksdajf
v/zxkcmv/zxclmv/.zxc,vm/xzc.,vm/xzcv,mxzc
@Auraelius
Auraelius / app_no_comments.rb
Created May 30, 2014 14:33
PCC Sintra demo without comments
require 'sinatra'
require 'data_mapper'
DataMapper.setup(:default, "sqlite3://#{settings.root}/dictionary.sqlite3")
set :port, 4000
set :bind, '0.0.0.0'
class Entry
include DataMapper::Resource
property :id, Serial
property :word, String
@Auraelius
Auraelius / app.rb
Created May 30, 2014 14:28
PCC Sinatra Demo
require 'sinatra' # simple web framework
require 'data_mapper' # metagem, requires common plugins too.
# need to install dm-sqlite-adapter
DataMapper.setup(:default, "sqlite3://#{settings.root}/dictionary.sqlite3")
set :port, 4000 # port and binding set for Nitrous.io debugging
set :bind, '0.0.0.0'
# You don't have to define the instance variables, DataMapper does that.
@Auraelius
Auraelius / sample_app.rb
Created October 23, 2013 21:15
A sample sinatra application for code challenge 3
# sample/sample_app.rb
require 'sinatra'
require 'pry'
# We us "classic" mode where you don't actually see the class
# inheriting from Sinatra::Base and you don't start the app with
# rackup. This makes the object structure less obvious but lets
# Sinatra do more of the behind-the-scenes