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
module ComparesByValue | |
def <=>(other) | |
self.value <=> other.value | |
end | |
end | |
class A < Struct.new(:value) | |
include ComparesByValue | |
include Comparable | |
end |
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
/* | |
* Test runner for phantomjs | |
*/ | |
var args = phantom.args; | |
var page = require('webpage').create(); | |
var fs = require('fs'); | |
var logfile = args[1] || "/tmp/out.log"; | |
fs.write(logfile, '', 'w'); |
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
console.log("it works") |
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
http://production.cf.rubygems.org |
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
# 85.159.215.71 / 192.168.168.47 / pxc1 | |
# 178.79.171.179 / 192.168.169.82 / pxc2 | |
# 213.52.128.96 / 192.168.170.100 / pxc3 | |
# 85.159.209.205 / 192.168.171.36 / pxc4 | |
# 80.85.85.243 / 192.168.168.7 / lb | |
# Adding percona repo | |
apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A | |
echo "deb http://repo.percona.com/apt trusty main" > /etc/apt/sources.list.d/percona.list | |
echo "deb-src http://repo.percona.com/apt trusty main" >> /etc/apt/sources.list.d/percona.list |
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
# 212.71.252.54 / 192.168.171.141 / node1 | |
# 176.58.103.254 / 192.168.171.142 / node2 | |
# 178.79.153.89 / 192.168.173.227 / node3 | |
# local hosts | |
192.168.171.141 node1 | |
192.168.171.142 node2 | |
192.168.173.227 node3 | |
# remote hosts |
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
## Adding precona repos | |
apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A | |
echo "deb http://repo.percona.com/apt trusty main" > /etc/apt/sources.list.d/percona.list | |
echo "deb-src http://repo.percona.com/apt trusty main" >> /etc/apt/sources.list.d/percona.list | |
apt-get update | |
## Installing percona server | |
apt-get install -y percona-server-server-5.6 percona-server-common-5.6 percona-server-client-5.6 percona-server-5.6-dbg # root/root | |
mysql -uroot -proot -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'" | |
mysql -uroot -proot -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'" |
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
config.sync = | |
# ... | |
couchDB: | |
urlRoot: 'http://localhost:5984' | |
options: | |
dataType: 'json' | |
contentType: 'application/json; charset=UTF-8' |
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
apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A | |
echo "deb http://repo.percona.com/apt trusty main" > /etc/apt/sources.list.d/percona.list | |
echo "deb-src http://repo.percona.com/apt trusty main" >> /etc/apt/sources.list.d/percona.list | |
apt-get update | |
apt-get install -y percona-server-server-5.6 | |
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'" | |
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'" | |
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'" |
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
# gem install activesupport | |
# runner.rb | sh | |
require 'active_support/values/time_zone' | |
ActiveSupport::TimeZone::MAPPING.values.each do |zone| | |
puts "TZ=#{zone} opal -e 'print \"#{zone}: \"; puts Time.at(9999999).yday'" | |
end |
OlderNewer