Skip to content

Instantly share code, notes, and snippets.

View zz's full-sized avatar
💭
I may be slow to respond.

ZZ zz

💭
I may be slow to respond.
  • Japan
View GitHub Profile
@zz
zz / Shadowsocks服务端性能优化.md
Created August 12, 2017 01:35 — forked from cyanife/Shadowsocks服务端性能优化.md
Shadowsocks服务端性能优化

#Shadowsocks服务端性能优化(CentOS6)

##ss加密算法 常用算法aes-256-cfb速度较慢,在路由器等arm平台表现不佳。 用于arm平台时,采用算法rc4-md5即可。 "method":"rc4-md5" 为加速加密速度,安装m2crypto

yum install m2crypto
@zz
zz / Results.md
Created May 11, 2017 10:50 — forked from nkt/Results.md
ReactPHP vs Node.js

wrk -t4 -c400 -d10s http://127.0.0.1:1337/

PHP

Running 10s test @ http://127.0.0.1:1337/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
 Latency 7.02ms 6.94ms 82.86ms 85.27%
@zz
zz / ovh_object_storage_curl.md
Last active December 17, 2016 07:32 — forked from LoicMahieu/reminder.md
OVH Object Storage with cURL
@zz
zz / _form.twig
Created September 6, 2016 16:33 — forked from jamband/_form.twig
Yii Framework & Twig: layouts/column1.twig
<div class="form">
{% set form = this.beginWidget('CActiveForm', {
'id': 'hoge-form',
'enableAjaxValidation': false,
}) %}
<p class="note">Fields with <span class="required">*</span> are required.</p>
{{ form.errorSummary(model) }}
@zz
zz / get-domain-expire.sh
Created May 10, 2016 03:12 — forked from myaaaaa-chan/get-domain-expire.sh
Zabbixでドメインの有効期限を監視する ref: http://qiita.com/myaaaaa_chan/items/e1e7313cf77eca587574
#!/bin/bash
PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'`
#. $PROGPATH/utils.sh
# Default values (days):
critical=30
warning=60
whois="/usr/bin/whois"
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# (C)2010 Owen Carter @ Mirabeau BV
# This script is provided as-is; no liability can be accepted for use.
# You are free to modify and reproduce so long as this attribution is preserved.
#
# (C)2013 Benoît LELEVÉ @ Exsellium (www.exsellium.com)
# Adding parameters in order to execute the script in a multiple MySQL instances environment
@zz
zz / steps.txt
Created February 18, 2016 13:56 — forked from bjeavons/steps.txt
steps for changing term background color on any SSH
/*
* How to change background iTerm color on SSH when using fish shell
*/
// Put this in a file, replace RGB color with your current bgcolor. ex: original-bgcolor
tell application "iTerm"
tell the current terminal
tell the current session
set background color to {0,0,0}
end tell
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<!-- The required Stripe lib -->
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&amp;staging