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
有两种方案,先说比较复杂的。 | |
1 Emacs+SLIME+SBCL | |
emacs的安装不说了,没有的yum就好。 | |
sbcl(Steel Bank Common Lisp),是一种高性能的common lisp编译器,yum即可。 | |
slime是emacs的common lisp模式,是emacs的一个插件,下载下来备用。 | |
然后,在emacs的配置文件中加入 | |
(setq inferior-lisp-program "/usr/bin/sbcl") | |
(require 'slime) | |
(slime-setup '(slime-fancy)) | |
重启emacs,也可以配置不重启让配置文件生效。 |
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); |
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
;; 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/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
#!/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/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
# 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
<?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
user nobody; | |
worker_processes auto; | |
error_log logs/error.log notice; | |
worker_rlimit_nofile 65535; | |
pid /var/run/nginx.pid; | |
events { | |
accept_mutex off; |
OlderNewer