$ dd if=/dev/urandom of=/mnt/data/my_file bs=1k count=5000000
5000000+0 records in
5000000+0 records out
5120000000 bytes (5.1 GB) copied, 460.399 s, 11.1 MB/s
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
| require 'mysql2' | |
| $mysql = Mysql2::Client.new( | |
| host: 'localhost', | |
| username: 'root' | |
| ) | |
| SLEEP_TIMEOUT=1.0 | |
| last_trx = 0 |
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
| aws s3 ls s3://my-bucket/my-prefix/ | awk '{print $3}' | ruby -e 'puts ARGF.read.split("\n").map(&:to_i).reduce(&:+)' |
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
| CREATE EXTERNAL TABLE raw_facts ( | |
| dimension1 STRING, | |
| dimension2 STRING, | |
| dimension3 STRING, | |
| dimension4 STRING, | |
| timestamp1 TIMESTAMP, | |
| timestamp2 TIMESTAMP, | |
| measure1 DECIMAL, | |
| measure2 DECIMAL, | |
| measure3 DECIMAL |
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
| CREATE TABLE facts ( | |
| dimension1 STRING, | |
| dimension3 STRING, | |
| dimension4 STRING, | |
| timestamp2 TIMESTAMP, | |
| measure1 DECIMAL, | |
| measure2 DECIMAL, | |
| measure3 DECIMAL | |
| ) PARTITIONED BY(dimension2 STRING, timestamp1 TIMESTAMP) | |
| CLUSTERED BY(dimension1) INTO 32 BUCKETS; |
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
| >> cat config/shark-server.conf | |
| description "shark server" | |
| start on runlevel [23] | |
| stop on shutdown | |
| exec /root/shark/bin/shark --service sharkserver 12022 |
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
| Nov 20 14:02:38 production-web-007 unicorn: E, [2014-11-20T22:02:32.901848 #13636] ERROR -- : worker=2 PID:20950 timeout (61s > 60s), killing | |
| Nov 20 14:02:38 production-web-007 unicorn: E, [2014-11-20T22:02:32.956764 #13636] ERROR -- : reaped #<Process::Status: pid 20950 SIGKILL (signal 9)> worker=2 | |
| Nov 20 14:02:38 production-web-007 unicorn: I, [2014-11-20T22:02:34.138374 #22844] INFO -- : worker=2 ready | |
| ... | |
| Nov 20 14:03:38 production-web-007 unicorn: E, [2014-11-20T22:03:35.392466 #13636] ERROR -- : worker=2 PID:22844 timeout (61s > 60s), killing | |
| Nov 20 14:03:38 production-web-007 unicorn: E, [2014-11-20T22:03:35.413304 #13636] ERROR -- : reaped #<Process::Status: pid 22844 SIGKILL (signal 9)> worker=2 | |
| Nov 20 14:03:38 production-web-007 unicorn: I, [2014-11-20T22:03:36.601522 #22983] INFO -- : worker=2 ready |
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
| <?php | |
| echo "Empty array false-y? " . (array() ? "No" : "Yes"); | |
| echo "\n"; | |
| echo "Array false-y? " . (array("hi") ? "No" : "Yes"); | |
| echo "\n"; | |
| echo "Associative array false-y? " . (array("hi" => "there") ? "No" : "Yes"); | |
| echo "\n"; |
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
| require 'mysql' | |
| # gem install reflect | |
| require 'reflect' | |
| sql = <<-SQL | |
| ( | |
| SELECT | |
| 'twitter' AS `Network`, | |
| DATE(scrape_time) AS `Scrape Date`, |
I hereby claim:
- I am bradhe on github.
- I am bradhe (https://keybase.io/bradhe) on keybase.
- I have a public key ASCEphB5acVdQ7wzmY47GaB1SgrOkh9rBzpenr74qe2bOwo
To claim this, I am signing this object: