Skip to content

Instantly share code, notes, and snippets.

View jankeesvw's full-sized avatar

Jankees van Woezik jankeesvw

View GitHub Profile
require 'sinatra'
require 'sinatra/activerecord/rake'
module Jekyll
class CodeTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@language = text
end
def render(context)
"<pre data-language='#{@language}'><code>"
class User < ActiveRecord::Base
has_many :followers
has_many :projects, through: :followers
end
class Project < ActiveRecord::Base
has_many :followers
@jankeesvw
jankeesvw / jquery.jspuzzle.js
Created November 9, 2012 07:31
jquery.jspuzzle.js
/*
* jquery.jspuzzle.js
* jQuery Photo Puzzle Plugin
* http://duncanmcintyre.net/plugins/jspuzzle/
*
* Copyright (c) 2011 Duncan McIntyre http://duncanmcintyre.net
* Version Beta
* Dual licensed under the MIT and GPL licenses.
*/
@jankeesvw
jankeesvw / .htaccess
Created October 22, 2012 19:35
Default wordpress htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
/*!
* Bootstrap v2.1.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
.clearfix {
<%=
random_tweet = tweets.sample
tweet_text = random_tweet["text"]
#make links clickable
tweet_text.gsub!(/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/) { |x| "<a href='#{x}'>#{x}</a>" }
#make mentions clickable
tweet_text.gsub!(/@\w+/) { |x| "<a href='http://twitter.com/#{x[1..-1]}'>#{x}</a>" }
* executing "touch /folderx/current/tmp/restart.txt"
servers: ["server.com"]
[server.com] executing command
command finished in 365ms
* executing "rake assets:precompile"
servers: ["server.com"]
[server.com] executing command
** [out :: server.com] rake aborted!
** [out :: server.com] No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
** [out :: server.com]
Tree for /Users/jankees/Documents/work/Superheroes/superheroes-roast-2012/frontend
+ .gitattributes
+ .gitignore
+ .htaccess
+ 404.html
+ apple-touch-icon-114x114-precomposed.png
+ apple-touch-icon-57x57-precomposed.png
+ apple-touch-icon-72x72-precomposed.png
+ apple-touch-icon-precomposed.png
+ apple-touch-icon.png