sudo apt-get install mesa-common-dev libsdl-ttf2.0-dev libopenal-dev libvorbis-dev libsndfile1-dev libfreeimage-dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -size +10000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cool shit about Ruby | |
# Arrays | |
array1, array2 = %w{ x y z }, %w{ w y z } | |
array1 | array2 ###(Union) #=> ["x", "y", "z", "w"] | |
array1 & array2 ###(Intersect) #=> ["y", "z"] | |
array1 - array2 ###(Difference) #=> ["x"] | |
# Strings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w = Widget.create({ | |
"initalize" function() { | |
this.active_toggle = ".active_toggle"; | |
} | |
"template": "widget_item", | |
"!change .active-toggle @is_active": function(is_active) { | |
// Update is_active status | |
this.active_toggle.prop("checked", is_active); | |
} | |
"inlineEditors(.item-title)": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MultiClip | |
def self.included( base ) | |
base.extend( ClassMethods ) | |
end | |
module ClassMethods | |
def has_attached_files( configs ) | |
after_initialize :gen_subdirs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
asset_path = File.expand_path(File.dirname(__FILE__) + '/../lib/assets/content/') | |
assets = Dir.glob(asset_path + '/*.yml') | |
assets.each do |url| | |
key = File.basename(url, '.yml') | |
parsed = YAML.load_file(url) | |
if parsed | |
klass = Admin.const_get(key.classify) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AdminHelper | |
def link_to_direction(field) | |
title = field.humanize | |
dir = @order_dir == 'ASC' ? 'desc' : 'asc' | |
link_to title, yield(:order => field, :dir => dir) if block_given? | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Configuration File for JavaScript Lint 0.3.0 | |
# Developed by Matthias Miller (http://www.JavaScriptLint.com) | |
# | |
# This configuration file can be used to lint a collection of scripts, or to enable | |
# or disable warnings for scripts that are linted via the command line. | |
# | |
### Warnings | |
# Enable or disable warnings based on requirements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Array.prototype.map === undefined) { | |
Array.prototype.map = function(callback) { | |
var len = this.length; | |
if (typeof callback != "function") { | |
throw new TypeError(); | |
} | |
var mapped = [len], | |
o = arguments[1]; | |
for (var i = 0; i < len; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development, :test do | |
gem 'rspec-rails', '>= 2.5.0' | |
gem 'capybara' | |
gem 'launchy' | |
end | |
group :test do | |
gem 'cucumber-rails' | |
gem 'factory_girl_rails' | |
gem 'database_cleaner' |