apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
This file contains hidden or 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
| [req] | |
| default_bits = 2048 | |
| prompt = no | |
| default_md = sha256 | |
| req_extensions = req_ext | |
| distinguished_name = dn | |
| [dn] | |
| C = AU | |
| ST = Victoria | |
| L = Melbourne |
This file contains hidden or 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
| // PhantomJS Cheatsheet | |
| $ brew update && brew install phantomjs // install PhantomJS with brew | |
| phantom.exit(); | |
| var page = require('webpage').create(); | |
| page.open('http://example.com', function() {}); | |
| page.evaluate(function() { return document.title; }); |
This file contains hidden or 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
| tmp/ |
This file contains hidden or 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 configuration for nginx to host Atlassian Jira / Jetbrain TeamCity or any other Tomcat web application | |
| # | |
| # author cedric.walter, www.waltercedric.com | |
| # to be saved for ex in /etc/nginx/sites-available/example | |
| server { | |
| listen 80; | |
| server_name jira.example.com; | |
| access_log off; | |
| location / { |
This file contains hidden or 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
| cd ~ | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <zabbix_export version="1.0" date="06.09.08" time="04.11"> | |
| <hosts> | |
| <host name="Template_MySQL_Server"> | |
| <useip>0</useip> | |
| <dns></dns> | |
| <ip></ip> | |
| <port>10050</port> | |
| <status>3</status> | |
| <groups> |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <!DOCTYPE module PUBLIC | |
| "-//Puppy Crawl//DTD Check Configuration 1.2//EN" | |
| "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
| <!-- | |
| Checkstyle-Configuration: Android checkstyle by Enea | |
| Description: none | |
| --> |
This file contains hidden or 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
| module MockSnowflake | |
| TWEPOCH = 1142974214000 | |
| WORKERIDBITS = 5 | |
| DATACENTERIDBITS = 5 | |
| MAXWORKERID = -1 ^ (-1 << WORKERIDBITS) | |
| SEQUENCEBITS = 12 | |
| WORKERIDSHIFT = SEQUENCEBITS | |
| DATACENTERIDSHIFT = SEQUENCEBITS + WORKERIDBITS | |
| TIMESTAMPLEFTSHIFT = SEQUENCEBITS + WORKERIDBITS + DATACENTERIDBITS |
This file contains hidden or 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
| #First tweet on 21 Mar 2006 at 20:50:14.000 GMT (in ms) | |
| TWEPOCH = 1288834974657 | |
| #High 42 bytes are timestamp, low 22 are worker, datacenter and sequence bits | |
| SHIFT = 22 | |
| # Give it a snowflake id, it tells you what time it was created | |
| # Will fail for very high ids because Ruby Time can only represent up to | |
| # Jan 18, 2038 at 19:14:07 UTC (max signed int in seconds since unix epoch) | |
| def what_time?(id) |
NewerOlder