ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
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
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
# Generate $prerender_ua bool value based on user agent | |
# indexation bots will get this as 1, | |
# prerender user agent will always get 0 (avoid loops) | |
map $http_user_agent $prerender_ua { | |
default 0; |
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
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_conversions import convert_color | |
from colormath.color_objects import LabColor | |
from colormath.color_objects import sRGBColor as RGBColor |
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
def compile_asset?(path) | |
# ignores any filename that begins with '_' (e.g. sass partials) | |
# all other css/js/sass/image files are processed | |
if File.basename(path) =~ /^[^_].*\.\w+$/ | |
puts "Compiling: #{path}" | |
true | |
else | |
puts "Ignoring: #{path}" | |
false | |
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
#!/usr/bin/env ruby | |
require "nokogiri" | |
# opens every file in the given dir tree and converts any html img tags to rails image_tag calls | |
# | |
# example usage: | |
# ruby convert.rb ~/my_rails_app/app/views | |
# | |
# ***be careful and backup before using this*** | |
# |