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
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
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 'rubygems' | |
require 'nokogiri' | |
class MyFilter | |
def ends_with set, ends | |
set.map { |x| x.to_s }.join.end_with? ends | |
end | |
end | |
doc = Nokogiri.XML(DATA) |
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
.modal { | |
width: 800px; | |
left: 40%; | |
} | |
.lightbox-content { | |
width: 100%; | |
} | |
.lightbox-image { |
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
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |
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
RUBY_GC_HEAP_FREE_SLOTS=600000 | |
RUBY_GC_HEAP_GROWTH_FACTOR=1.25 | |
RUBY_GC_HEAP_GROWTH_MAX_SLOTS=300000 | |
RUBY_GC_HEAP_INIT_SLOTS=600000 | |
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.3 | |
RUBY_GC_MALLOC_LIMIT=64000000 | |
RUBY_GC_OLDMALLOC_LIMIT=64000000 | |
RUBY_HEAP_FREE_MIN=12500 | |
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
RUBY_HEAP_SLOTS_INCREMENT=100000 |
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
# Run following command: | |
curl https://gist.githubusercontent.com/mikepenz/a8a4a52f67a391895a4c/raw/22db5a0c3b009442a9ff8fd454e08f429d706c8c/multitail.sh | sh; source ~/.bashrc | |
# This will start the script multitail.sh and call source ~/.bashrc afterwards | |
#try to run | |
#logt (log-tomcat) output normal /usr/local/tomcat/logs/catalina.out or /var/www/tomcat/logs/catalina.out | |
logt | |
#logt (log-tomcat) output overwrite tomcat or logfile /usr/local/$1/logs/$2 or /var/www/$1/logs/$2 | |
logt $1 $2 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<path d=" | |
M 18 191 L 58.1684 191 L 58.1684 129.1406 L 73.5454 112.6903 |
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
set -e | |
title='千尋影視' # dmg 文件 mount 了之后在文件系统中显示的名称 | |
background_picture_name='mac-dmg-bg.png' # dmg 文件在 mount 了之后界面中显示的背景图片路径 | |
application_name='千尋影視.app' # 应用程序的名称 | |
# Developer ID 证书的名称(名字的一部分即可,但是需要能在 Keychain Access 中唯一定位到该证书) | |
developer_id='Developer ID Application: Shanghai Truecolor Multimedia' | |
# dmg 窗口相关的一些设置,需要根据实际情况做变更 | |
window_left=200 # 窗口位置的 x 坐标 |
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 "net/http" | |
require "enumerator" | |
# Example Usage: | |
# | |
# use Rack::Proxy do |req| | |
# if req.path =~ %r{^/remote/service.php$} | |
# URI.parse("http://remote-service-provider.com/service-end-point.php?#{req.query}") | |
# end | |
# 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
#!/bin/sh | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
OlderNewer