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 python | |
# -*- coding: utf-8 -*- | |
import multiprocessing | |
import paramiko | |
import getpass | |
import logging | |
import requests | |
import argparse | |
import socket | |
import time |
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
user nobody; | |
worker_processes auto; | |
error_log logs/error.log notice; | |
worker_rlimit_nofile 65535; | |
pid /var/run/nginx.pid; | |
events { | |
accept_mutex off; |
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
<?php | |
class Client | |
{ | |
private static $_logFile; | |
private static $_parseOffset; | |
private static $_dsn; | |
private static $_logtailBin; | |
private static $_maxItem; | |
public static function run($options) | |
{ |
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
# This file is just Python, with a touch of Django which means you | |
# you can inherit and tweak settings to your hearts content. | |
from sentry.conf.server import * | |
import os.path | |
CONF_ROOT = os.path.dirname(__file__) | |
DATABASES = { | |
'default': { | |
# You can swap out the engine for MySQL easily by changing this value |
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 | |
# | |
# curl wrapper returning timing information. | |
# curl format adapted from | |
# http://digdeeply.org/archives/05102012.html | |
# Example usage: | |
# $ trace-url http://www.apple.com | |
# $ time trace-url http://www.apple.com -v | |
set -e |
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 | |
PHP_VERSION="5.5.0" | |
yum -y install \ | |
curl-devel.x86_64 \ | |
libmcrypt-devel.x86_64 \ | |
libxml2-devel.x86_64 \ | |
libtool-ltdl-devel.x86_64 \ | |
pcre-devel.x86_64 \ |
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 | |
#use /usr/sh /path/script.sh > report.txt | |
SOURCE_ROOT='/source/code/directory' | |
PHP_BIN='/usr/bin/php5.5' | |
for file in $(find ${SOURCE_ROOT} -type f -iname '*.php'); do | |
check_syntax=$(${PHP_BIN} -d error_reporting=E_ALL -l $file | grep -v 'No syntax errors detected') | |
done |
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
;; Org mode settings | |
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) | |
(require 'org-install) | |
(require 'ob-ditaa) | |
(require 'org-latex) | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-ca" 'org-agenda) |
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 | |
epylint "$1" 2>/dev/null | |
pyflakes "$1" | |
pep8 --ignore=E221,E701,E202 --repeat "$1" | |
true |
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
//将用户进行随机分组,每组6个 | |
$all = array( | |
'x1','x2','x3','x4', | |
'x5','x6','x7','x8', | |
); | |
define('GROUP_MAX', 6); | |
$groupCount = getGroupCount(count($all)); | |
$groups = initGroups($groupCount); | |
shuffle($all); |