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
# note - you may need to split into a before-deploy (stop) and after-deploy (start) depending on your setup | |
desc "Hot-reload God configuration for the Resque worker" | |
deploy.task :reload_god_config do | |
sudo "god stop resque" | |
sudo "god load #{File.join deploy_to, 'current', 'config', 'resque.god'}" | |
sudo "god start resque" | |
end | |
after 'deploy:update_code', 'deploy:update_shared_symlinks' |
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 'goliath' | |
require 'http_router' | |
# https://github.com/joshbuddy/http_router | |
HttpRouter::Rack.override_rack_builder! | |
class RackRoutes < Goliath::API | |
map('/get/:id') do |env| | |
[200, {'Content-type' => 'text/plain'}, ["My id is #{env['router.params'][:id]}\n"]] | |
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
# example location parts of nginx.conf | |
# add your own AWS keys, server lines etc, and set your aws domains, paths | |
http { | |
# you will need the luacrypto in the cpath, download from http://luacrypto.luaforge.net/ | |
lua_package_cpath "/home/justin/lua/luacrypto-0.2.0/src/l?.so.0.2.0;;"; | |
server { | |
listen 80; |
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
worker: QUEUE=* bundle exec rake environment resque:work | |
scheduler: bundle exec rake environment resque:scheduler |
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
# Public: generates a mixable singleton implementation dependent on a model key. | |
# Once you mix it into a model, your model gains an .instance method that will | |
# generate an object and cache it. Further calls to the .instance methods will | |
# return the same object. | |
# | |
# key - The name of the attribute we use to index instances. Defaults to "id". | |
# | |
# Example | |
# | |
# # Called without arguments uses the "id" as key. |
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
vmadm list | |
# remove your previous try | |
export ID=`vmadm list|grep run|cut -b-36` ; echo $ID | |
export ID=`vmadm list|grep stop|cut -b-36` ; echo $ID | |
vmadm stop $ID | |
vmadm destroy $ID | |
script | |
dladm show-phys -m | |
dladm show-link |
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
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
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
# standard capistrano config goes here.... | |
# Put the maintenance screen if DB migrations take in place only | |
before "deploy", "deploy:delayed_job:stop" | |
before "deploy:migrations", "deploy:delayed_job:stop" | |
after "deploy:update_code", "deploy:symlink_shared", "deploy:assets_compress" | |
before "deploy:migrate", "deploy:web:disable", "deploy:db:backup" | |
after "deploy", "newrelic:notice_deployment", "deploy:cleanup", "deploy:delayed_job:restart" |
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
Need to open /usbkey/config and add | |
admin_v6_ip=xx:xx:xx/xx | |
admin_v6_gateway=yy:yy:yy | |
place ipv6 in /opt/custom/smf | |
place ipv6.xml in /opt/custom/scripts |
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
diff --git a/siphash.c b/siphash.c | |
index c100b14..589cdec 100644 | |
--- a/siphash.c | |
+++ b/siphash.c | |
@@ -8,7 +8,11 @@ | |
#ifdef _WIN32 | |
#define BYTE_ORDER __LITTLE_ENDIAN | |
#elif !defined BYTE_ORDER | |
- #include <endian.h> | |
+ #if defined(sun) |
OlderNewer