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
alert(1);
@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 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

@yesmeck
yesmeck / keybase.md
Created February 27, 2015 05:06
keybase.md

Keybase proof

I hereby claim:

  • I am yesmeck on github.
  • I am yesmeck (https://keybase.io/yesmeck) on keybase.
  • I have a public key whose fingerprint is 26A9 0B54 5590 9D71 AC36 90B6 E3B5 FC04 0B5C 10B3

To claim this, I am signing this object:

@yesmeck
yesmeck / README.md
Last active August 29, 2015 14:18
WNDR4300 刷 OpenWrt 装 Shadowsocks

硬件准备

@yesmeck
yesmeck / ngEnter.js
Last active September 2, 2015 09:11 — forked from EpokK/ngEnter.js
ngEnter directive if you can use submit form(https://twitter.com/ririlepanda)
app.directive('ngEnter', function() {
return function(scope, element, attrs) {
element.bind("keydown keypress", function(event) {
if(event.which === 13) {
scope.$apply(function(){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
@yesmeck
yesmeck / hello_world.php
Created May 30, 2011 01:43
hello world
<?php
echo 'hello world';
@yesmeck
yesmeck / mysql_backup.sh
Created October 27, 2011 05:13
mysql backup
#!/bin/bash
max_file_count=15
file_count=$(ls mysql-* | wc -l)
if [ $file_count -gt $max_file_count ]
then
rm mysql-*
fi