This file contains hidden or 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
# config/initializers/active_admin_mongomapper_patches.rb | |
require "active_admin" | |
require "active_admin/resource_controller" | |
require 'ostruct' | |
module ActiveAdmin | |
class Namespace | |
# Disable comments | |
def comments? |
This file contains hidden or 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
set :rails_env, :production | |
set :unicorn_binary, "/usr/bin/unicorn" | |
set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
namespace :deploy do | |
task :start, :roles => :app, :except => { :no_release => true } do | |
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
end | |
task :stop, :roles => :app, :except => { :no_release => true } do |
This file contains hidden or 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
upstream app { | |
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.app.com; | |
rewrite ^/(.*) http://app.com/$1 permanent; | |
} | |
server { |
This file contains hidden or 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
sudo port install geos configure.cc=gcc-4.2 configure.cxx=g++-4.2 |
This file contains hidden or 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
# To make irb UTF-8 input work on Mac OS X Snow Leopard | |
$ sudo port install readline | |
$ svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_72/ext/readline/ readline | |
$ cd readline | |
$ curl http://pastie.textmate.org/pastes/168767/download | patch readline/extconf.rb | |
$ ruby extconf.rb | |
$ make | |
$ sudo make install |
This file contains hidden or 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/ruby | |
# Супер рекурсивный индексер. Версия 3 | |
def recurse_dir(o, dirname) | |
entries = Dir.entries(dirname) | |
directories = entries.find_all {|e| FileTest.directory? File.join(dirname, e)}.sort{|a,b| a.gsub(/[^0-9A-z]/, "").to_i <=> b.gsub(/[^0-9A-z]/, "").to_i} | |
files = entries.find_all {|e| FileTest.file? File.join(dirname, e)}.sort{|a,b| a.gsub(/[^0-9A-z]/, "").to_i <=> b.gsub(/[^0-9A-z]/, "").to_i} | |
directories.reject! {|a| a =~ /^\./} |
This file contains hidden or 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
// ==UserScript== | |
// @name SpyMaster Bot | |
// @namespace jadi | |
// @description Simple bot that plays spymaster for you while you're away. Leave your browser window open on the tasks screen and this will perform tasks for you every minute. | |
// @include http://playspymaster.com/tasks | |
// @include http://www.playspymaster.com/tasks | |
// ==/UserScript== | |
/* | |
* jQuery JavaScript Library v1.3.2 |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<object id="o3d" type="application/vnd.o3d.auto" style="width: 500px; height: 500px; "></object> | |
<div style="display:none"> | |
<!-- Start of effect --> |
NewerOlder