Skip to content

Instantly share code, notes, and snippets.

View jankeesvw's full-sized avatar

Jankees van Woezik jankeesvw

View GitHub Profile
@jankeesvw
jankeesvw / tree.rb
Created August 10, 2012 07:08
tree
#!/usr/bin/env ruby
def print_folder path, depth
supplement = ""
for i in 0..depth
supplement = supplement + " "
end
supplement = supplement + "+"
<VirtualHost *:80>
ServerName roast.dev
DocumentRoot /Users/jankees/Documents/work/Superheroes/superheroes-roast-2012/frontend
Options Indexes MultiViews
</VirtualHost>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<!doctype html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en"> <!--<![endif]-->
<head>
#!/usr/bin/env ruby
require "thor"
class Apache < Thor
desc "start", "Start apache"
def start
system "sudo apachectl start"
puts "Apache started"
end
@jankeesvw
jankeesvw / code.js
Created July 19, 2012 08:02
console trace object
JSON.stringify(model.getPhones(),null,'\t')
@jankeesvw
jankeesvw / osx_lion_rail_setup.md
Created July 12, 2012 12:04 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
###
* NavigationState
###
window.NavigationState = class NavigationState
constructor: (path) ->
@_setPath(path)
# take care of the trailing and ending slashes, and replaces spaces with dashes
_setPath: (path) ->
# if the input is a NavigationSate, make it an array
path = path.getSegments() if path instanceof NavigationState is true
# if the input is an array, join them with slashes
path = path.join('/') if Array.isArray(path)
# add a slash in the begin if it isn't present
path = '/' + path if path.charAt(0) isnt '/'
# add a slash at the end if it isn't present
path = path + '/' if path.charAt(path.length - 1) isnt '/'
# replace double slashes