Getting Powerball drawing data from 11/27/2012 back to 01/07/2009 ...
Got 641775 bytes of Powerball data. Stand by for parsing.
Examining results of 406 drawings...
Top 5 numbers: 20, 41, 32, 59, 22
Top Powerball: 23
Detail:
Regular numbers
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
| > SidekiqUniqueJobs::LockDigest.new({ | |
| 'class' => 'SidekiqQueuesMetricsWorker', | |
| 'queue' => 'system_critical', | |
| 'lock_args' => [], | |
| }).lock_digest | |
| # => ":c9e4f70a93ec7b29f57842219285f439" | |
| > r = Redis.new | |
| # => #<Redis client v4.8.1 for redis://hostname.... |
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 | |
| ioreg_data = IO.popen("ioreg -w0 -l").readlines().join | |
| ioreg_data.sub!(/.*(\+\-o AppleSmartBattery.*?\+\-o).*/m, '\\1') | |
| ioreg_data.gsub!(/\s+\|/, "") | |
| ioreg_data.gsub!(/\s\s+/, "\n") | |
| battery = Hash.new | |
| ioreg_data.split(/\n+/).each do |line| | |
| key, value = line.split(' = ')[0..1] | |
| next if key.nil? || value.nil? |
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
| SELECT pg_class.relname | |
| FROM pg_class, pg_index | |
| WHERE pg_index.indisvalid = false | |
| AND pg_index.indexrelid = pg_class.oid; |
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
| # from http://dzone.com/snippets/analyse-binary-log | |
| # cat /bin/mylog | |
| #!/bin/sh | |
| # usage: | |
| #$ mylog /mysql-bin-log/db-bin.000223 | |
| # 2132 insert into customers | |
| # 1887 update userlog_access | |
| # 788 insert into gn_commission | |
| # 718 insert into con_tab |
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
| Ruby and Ruby and Rails still feel fresh and new to me, but (surprise!) Ruby is over 20 years old, and Rails is nearly 12. | |
| A lot's happened in the ecosystem over time, practices have changed, gems have shot up the charts and later fallen out of favor, and new programming techniques have come on the scene. | |
| Keeping up with this can be a challenge, especially for those working on long-term projects and/or on stable teams with few newcomers: how do you get your job done and ship a product while also continually refining your skills and learning about new solutions & professional best practices? | |
| You know there are twitterers, podcasts, courses, books, and even blogs (yes, people still do those!) - but how do you find them, and which are worthwhile to invest your time and money in? | |
| Let's pool our knowledge and 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
| Rain gear | |
| ----------- | |
| rain jacket, w/bag | |
| rubberized gloves | |
| shower cap? | |
| in dry bags: | |
| extra jersey | |
| extra undershirt? | |
| extra shorts | |
| extra socks |
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
| Great panniers: http://www.arkel-od.com | |
| Great fenders and headlights: http://planetbike.com/page/ | |
| Great taillight: https://www.ridepdw.com/goods/lights/danger-zone-usb |
This file has been truncated, but you can view the full file.
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 'zip-codes' | |
| time_zones_by_zip = { | |
| "00501" => "America/New_York", | |
| "00544" => "America/New_York", | |
| "01001" => "America/New_York", | |
| "01002" => "America/New_York", | |
| "01003" => "America/New_York", | |
| "01004" => "America/New_York", | |
| "01005" => "America/New_York", |
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
| def quick_number_to_currency(num) | |
| left, right = sprintf("%.2f", num).split('.') | |
| 1 while left.sub!(/(\d)(\d\d\d)\b/, '\1' + ',' + '\2') | |
| "$#{left}.#{right}" | |
| end | |
| it "turns 1000 into $1,000.00" do | |
| @rt.quick_number_to_currency(1000).should eql("$1,000.00") | |
| end |
NewerOlder