Skip to content

Instantly share code, notes, and snippets.

Robby Grossman freerobby

Block or report user

Report or block freerobby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9f92ebe30e6d5a50a81b
This file has been truncated, but you can view the full file.
TOP SECRET
Nofqrn
^CLASSIFIED'
Senate Select Comiiiittee on Infelligeoee
Committee Study ofthe CentralIntelligenceAgmcy's Detention and Interrogation Program
SBg=53
Foreword by Senate Select Committee on Intelligence Chairman Bianne Feinstein Findings and Concliisioiis
Executive Summary
Approved Deeember 13,,2012 Updatedfor Release April 3, 2014 Deciassificatiori Revisions December 3, M l 4
@freerobby
freerobby / gist:8741000
Created Jan 31, 2014
When heatmaps are wrong.
View gist:8741000
Our heatmaps are generated via sets of events. The notable ones are "start" and
"stop" events.
Let's say we have a 60-second video with some events attached to it.
A video watched all the way through exactly once looks like this:
a = start
z = stop
|------------------------------------------------------------|
a z
View shares-repair.rb
# First split the keys into a bunch of files:
# ubuntu@rails01:/mnt/links$ split -l 100000 -d -a 4 links_dump.dat
current_file = 4
def get_filenames(base_path, num_files) # Remember, num_files= last file # + 1
filenames = []
num_files.times do |num|
num = num.to_s
while num.length < 4 do
View gist:4513453
jruby-1.7.1 :001 > User == "User".constantize
=> true
jruby-1.7.1 :002 > defined?(User)
=> "constant"
jruby-1.7.1 :003 > defined?("User".constantize)
=> "method"
@freerobby
freerobby / export_bucket_keys.rb
Last active Dec 10, 2015
Exports all keys in a riak bucket into a newline-delimited file.
View export_bucket_keys.rb
# This function uses net::http streaming and the Riak HTTP endpoint
# to export all keys in a riak bucket into a newline-delimited file.
require 'json'
require 'net/http'
RIAK_ROOT = 'http://localhost:8098'
# bucket: The bucket to export
# path: The folder into which to put the output file
View tb.log
17:52:14,380 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff0a7ca6e9:-ac17317:502001c2:1dd0 in state RUN
17:52:14,626 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012095: Abort of action id 0:ffff0a7ca6e9:-ac17317:502001c2:1dd0 invoked while multiple threads active within it.
17:52:14,679 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012108: CheckedAction::check - atomic action 0:ffff0a7ca6e9:-ac17317:502001c2:1dd0 aborting with 1 threads active!
17:52:14,802 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffff0a7ca6e9:-ac17317:502001c2:1dd0
17:52:14,988 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff0a7ca6e9:-ac17317:502001c2:1dd0 in state COMPLETE
17:53:20,244 WARN [com.arjuna.ats.arjuna] (Thread-0 (Hor
View tb.log
17:14:56,342 WARN [org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl] (Thread-15 (HornetQ-server-HornetQServerImpl::serverUUID=e3277541-da78-11e1-855f-296c10b55f7f-1810101068)) Couldn't locate page transaction 529656, ignoring message on position PagePositionImpl [pageNr=28, messageNr=754, recordID=0] on address=jms.queue./queues/torquebox/current-knob/tasks/torquebox_backgroundable queue=jms.queue./queues/torquebox/current-knob/tasks/torquebox_backgroundable
17:14:56,342 WARN [org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl] (Thread-15 (HornetQ-server-HornetQServerImpl::serverUUID=e3277541-da78-11e1-855f-296c10b55f7f-1810101068)) Couldn't locate page transaction 529661, ignoring message on position PagePositionImpl [pageNr=28, messageNr=755, recordID=0] on address=jms.queue./queues/torquebox/current-knob/tasks/torquebox_backgroundable queue=jms.queue./queues/torquebox/current-knob/tasks/torquebox_backgroundable
17:14:56,342 WARN [org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl] (T
View memberstatus
ubuntu@ip-10-123-21-233:/var/log/riak$ riak-admin member_status
Attempting to restart script through sudo -u riak
================================= Membership ==================================
Status Ring Pending Node
-------------------------------------------------------------------------------
valid 0.0% 0.0% 'riak@10.123.21.233'
valid 37.5% 25.0% 'riak@10.123.46.124'
valid 29.7% 25.0% 'riak@10.124.169.43'
valid 29.7% 25.0% 'riak@10.86.199.20'
valid 3.1% 25.0% 'riak@10.87.25.198'
View knife.rb
current_dir = File.dirname(__FILE__)
ENV["ORGNAME"] = ENV["OPSCODE_ORGNAME"]
sys_user = ENV["USER"]
opscode_user = ENV["OPSCODE_USER"]
log_level :info
log_location STDOUT
node_name opscode_user
View gist:3130894
17:41:48,468 ERROR [org.apache.coyote.http11.Http11Processor] (http-/10.86.135.8:8080-49) Error processing request: java.lang.OutOfMemoryError: PermGen space
at java.lang.Throwable.getStackTraceElement(Native Method) [rt.jar:1.6.0_24]
at java.lang.Throwable.getOurStackTrace(Throwable.java:608) [rt.jar:1.6.0_24]
at java.lang.Throwable.getStackTrace(Throwable.java:599) [rt.jar:1.6.0_24]
at org.jboss.logmanager.formatters.Formatters$12.renderRaw(Formatters.java:384) [jboss-logmanager-1.3.1.Final.jar:1.3.1.Final]
at org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:150) [jboss-logmanager-1.3.1.Final.jar:1.3.1.Final]
at org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:86) [jboss-logmanager-1.3.1.Final.jar:1.3.1.Final]
at org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:35) [jboss-logmanager-1.3.1.Final.jar:1.3.1.Final]
at org.jboss.logmanager.handlers.WriterHandler.doPubli
You can’t perform that action at this time.