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/bash | |
SED=/bin/sed | |
NGINX_INIT="/etc/init.d/nginx" | |
NGINX_CONF="/usr/local/nginx/conf/nginx.conf" | |
FPM_1="/etc/init.d/php-fpm" | |
FASTCGI_1="php-fpm.socket" | |
FASTCGI_1_PID="/var/run/php-fpm.pid" |
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
$('div.rule-violations').each(function() { | |
var header = $(this).find('h2').text().replace(/\s+/g, " "); | |
var labels = $(this).find('ul li.label').map(function() { | |
return $(this).text(); | |
}).get().join(', '); | |
console.log(header + " (" + labels + ")"); | |
var titles = []; | |
$(this).find('div.violations div.location').each(function() { | |
titles.push(" " + $(this).html().replace(/\s+/g, " ")); | |
}); |
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
118.80.9.96 - - [27/Sep/2014:19:18:57 +0800] "GET /i14/0927/603077.php HTTP/1.1" 200 7724 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" "-" | |
60.14.15.145 - - [27/Sep/2014:19:18:57 +0800] "GET /p3/ HTTP/1.1" 200 15227 "http://www.1\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA4\xB1\xEF\xBE\xB5\xE2\xA0\xB1\xEF\xBE\xB6\xE2\xA4\xB1\xEF\xBE\xB5\xE2\x98\xAF\xEF\xBE\xB4\xE2\x9C\xAF\xEF\xBE\xB3\xE2\x98\xAF\xEF\xBE\xB4\xE2\x98\xAF\xEF\xBE\xB4\xE2\x9C\xAF\xEF\xBE\xB3\xE2\x98\xAF\xEF\xBE\xB4\xE2\x9C\xAF\xEF\xBE\xB3\xE2\x98\xAF\xEF\xBE\xB4\xE2\x98\xAF\xEF\xBE\xB4\xE2\x9C\xAF\xEF\xBE\xB3\xE2\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
server { | |
listen 8888; | |
server_name fw.dev 127.0.0.1; | |
root /var/www/html/fwdev; | |
error_page 403 http://www.example.com; | |
allow 127.0.0.1; | |
deny all; |
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
div.logo { | |
height: 100px; | |
} | |
li.active { | |
color: yellow; | |
background: #cdecde; | |
} | |
#nav ul li { |
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
"wmctrl -xa xfce4-terminal || xfce4-terminal" | |
Alt + 1 | |
"wmctrl -xa Firefox || firefox" | |
Alt + 2 | |
"wmctrl -xa google-chrome || google-chrome" | |
Alt + 3 | |
"wmctrl -xa nautilus || nautilus" |
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 laravel; | |
root /var/www/laravel/public; | |
error_log /usr/local/nginx/logs/laravel.error.log; | |
access_log /usr/local/nginx/logs/laravel.access.log; | |
location / { |
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
# compile php from source code with the same compile options from the previous php version. | |
`php -i | grep configure | sed "s/'//g" | awk -F">" '{print $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
ruby -e 'require "active_record"; puts "ok"' |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'find' | |
class XMLValidate | |
class << self | |
def run path | |
files = 0 | |
failed_files = 0 | |
Find.find path do |file| |
NewerOlder