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
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
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
| Promise = require('bluebird') | |
| var A = function() { | |
| return new Promise(function(resolve, reject) { | |
| var result = 'A is done' | |
| console.log(result) | |
| resolve(result); | |
| }) |
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
| listen l1 | |
| bind 0.0.0.0:80 | |
| mode tcp | |
| timeout connect 4000 | |
| timeout client 180000 | |
| timeout server 180000 | |
| server srv1 192.168.1.1:80 | |
| global | |
| user "nobody" |
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
| sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
| sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
| sudo yum install -y apache-maven | |
| mvn --version |
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
| $ redis-benchmark -a gDDTEGhRnReCKQEn -p 6479 -h 192.168.140.74 | |
| ====== PING_INLINE ====== | |
| 100000 requests completed in 2.48 seconds | |
| 50 parallel clients | |
| 3 bytes payload | |
| keep alive: 1 | |
| 41.71% <= 1 milliseconds | |
| 93.96% <= 2 milliseconds | |
| 99.36% <= 3 milliseconds |
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
| import java.io.Closeable; | |
| import java.io.IOException; | |
| import java.nio.charset.Charset; | |
| import java.sql.Connection; | |
| import java.sql.DatabaseMetaData; | |
| import java.sql.DriverManager; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.sql.Statement; |