Skip to content

Instantly share code, notes, and snippets.

View yesmeck's full-sized avatar
:octocat:
<img src="x" onerror="alert(1)" />

Wei Zhu yesmeck

:octocat:
<img src="x" onerror="alert(1)" />
View GitHub Profile
@yesmeck
yesmeck / .powrc
Created November 5, 2013 05:43
Pow with RVM's ruby-version
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ]; then
source "$rvm_path/scripts/rvm"
if [ -f ".ruby-gemset" ]; then
rvm use `cat .ruby-version`@`cat .ruby-gemset`
else
rvm use `cat .ruby-version`
fi
fi
@yesmeck
yesmeck / Profile
Created January 4, 2014 06:21
foreman
sidekiq: bundle exec sidekiq -c 1
[2] pry(main)> "鬼入鏡:詛咒-2D中文版 (Walking With Dinosaurs-2D Digital Chinese ver.) (普遍級)".match /(.+?)-(.+?)\s\(.+?\)\s\((.+)\)/
=> #<MatchData
"鬼入鏡:詛咒-2D中文版 (Walking With Dinosaurs-2D Digital Chinese ver.) (普遍級)"
1:"鬼入鏡:詛咒"
2:"2D中文版"
3:"普遍級">
alert(1);
@yesmeck
yesmeck / cVimrc
Last active November 13, 2017 03:21
cVimrc
let barposition = "bottom"
map <C-f> scrollPageDown
map <C-d> scrollPageUp
@yesmeck
yesmeck / site
Last active August 29, 2015 14:09
nginx
upstream app_server {
server unix:/path/to/app/tmp/sockets/unicorn.sock;
}
server {
server_name app.com;
root /path/to/app/public;
access_log /var/log/nginx/app.access.log main;
@yesmeck
yesmeck / unicorn.rb
Created December 18, 2014 05:59
unicorn zero downtime config
# Sample verbose configuration file for Unicorn (not Rack)
#
# This configuration file documents many features of Unicorn
# that may not be needed for some applications. See
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb
# for a much simpler configuration file.
#
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
@yesmeck
yesmeck / unicorn.rb
Created December 18, 2014 06:36
unicorn config
# Sample verbose configuration file for Unicorn (not Rack)
#
# This configuration file documents many features of Unicorn
# that may not be needed for some applications. See
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb
# for a much simpler configuration file.
#
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
@yesmeck
yesmeck / regex.md
Last active August 29, 2015 14:13
Regex Lookaround
Regex Match
q(?=u) q followed by a u
q(?!u) q not followed by a u
(?<=u)q q preceded by u
(?

Gist Vim