Skip to content

Instantly share code, notes, and snippets.

@snakevil
snakevil / openwrt-barrierbreaker-rc3-handbook.md
Last active Aug 14, 2018
OpenWrt BarrierBreaker 14.07-rc3 手记
View openwrt-barrierbreaker-rc3-handbook.md

OpenWrt BarrierBreaker 14.07-rc3 手记

1 外置存储 - ExtRoot

1.1 USB HDD 分区

安装依赖和工具包:
@kevinzhow
kevinzhow / route.sh
Last active Jun 18, 2019
AnyConnect 路由表
View route.sh
route = 8.0.0.0/255.0.0.0
route = 58.0.0.0/255.0.0.0
route = 23.0.0.0/255.0.0.0
route = 117.0.0.0/255.0.0.0
route = 199.0.0.0/255.0.0.0
route = 190.0.0.0/255.0.0.0
route = 198.0.0.0/255.0.0.0
route = 173.0.0.0/255.0.0.0
route = 174.0.0.0/255.0.0.0
route = 168.0.0.0/255.0.0.0
@postmodern
postmodern / rails_rce.rb
Last active Apr 14, 2021
Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
View rails_rce.rb
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#
# ## Advisory
#
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
#
# ## Caveats
#
@evanwalsh
evanwalsh / gist:2552100
Created Apr 29, 2012 — forked from joelmoss/gist:2470666
Capistrano recipe for Puma start/stop/restarts
View gist:2552100
set :shared_children, shared_children << 'tmp/sockets'
namespace :deploy do
desc "Start the application"
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false
end
desc "Stop the application"
task :stop, :roles => :app, :except => { :no_release => true } do
@sorah
sorah / thin
Created Nov 30, 2011
/etc/init.d/thin - thin init script with bundle exec. own your risk - public domain.
View thin
#!/bin/bash
DAEMON=/path/to/thin
BUNDLE=/path/to/bundle
CONFIG_PATH=/etc/thin
SCRIPT_NAME=/etc/init.d/thin
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@chjj
chjj / trans.sh
Created Nov 6, 2011
setting transparency from bash
View trans.sh
#!/bin/bash
# transset in a bash script
# copyright (c) 2011, christopher jeffrey
# usage:
# by window id
#trans -w "$WINDOWID" -o 75
# by name
#trans -n "urxvt" -o 75
@shapeshed
shapeshed / nginx_rails_3_1
Created Oct 10, 2011
Nginx Config for Rails 3.1 with Unicorn and Asset Pipeline
View nginx_rails_3_1
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 {