Skip to content

Instantly share code, notes, and snippets.

View davidsnyder's full-sized avatar

David Snyder davidsnyder

View GitHub Profile
> bundle exec ruby reterm.rb
Unhandled error:
undefined method `nav_select=' for nil:NilClass
/Users/davidsnyder/.rvm/gems/ruby-2.5.3/gems/reterm-0.6.3/lib/reterm/mixins/nav_input.rb:166:in `nav_to_selected'
/Users/davidsnyder/.rvm/gems/ruby-2.5.3/gems/reterm-0.6.3/lib/reterm/mixins/nav_input.rb:207:in `handle_mouse'
/Users/davidsnyder/.rvm/gems/ruby-2.5.3/gems/reterm-0.6.3/lib/reterm/mixins/nav_input.rb:65:in `handle_input'
/Users/davidsnyder/.rvm/gems/ruby-2.5.3/gems/reterm-0.6.3/lib/reterm/layout.rb:195:in `activate!'
/Users/davidsnyder/.rvm/gems/ruby-2.5.3/gems/reterm-0.6.3/lib/reterm/window.rb:531:in `activate!'
reterm.rb:30:in `block in <main>'
/Users/davidsnyder/.rvm/gems/ruby-2.5.3/gems/reterm-0.6.3/lib/reterm/init.rb:53:in `init_reterm'
require 'reterm'
include RETerm
results = {}
init_reterm {
win = Window.new
win.colors = :main
win.border!
davidsnyder@loki: mle$ brew info pcre
pcre: stable 8.42 (bottled), HEAD
Perl compatible regular expressions library
https://www.pcre.org/
/usr/local/Cellar/pcre/8.42 (204 files, 5.3MB) *
Poured from bottle on 2018-09-17 at 15:51:25
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pcre.rb
==> Options
--HEAD
Install HEAD version
<?php
/*~ class.phpmailer.php
.---------------------------------------------------------------------------.
| Software: PHPMailer - PHP email class |
| Version: 2.0.4 |
| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
| Info: http://phpmailer.sourceforge.net |
| Support: http://sourceforge.net/projects/phpmailer/ |
| ------------------------------------------------------------------------- |
| Author: Andy Prevost (project admininistrator) |
The Fondazione di Venezia, would like to notify you that you have been chosen by the board of trustees as one of the final recipients of a cash Grant/Donation for your own personal, educational, and business development. The Church, established in the year 1872, is one of the biggest church built for God in Italy. In the year 1901, they started offering collection for the sole aim of human growth, educational and Community development. In conjunction with the UN, and EU, We are giving out a yearly donation of US$1,150,000.00 each to 10 lucky recipients each year. These specific Donations/Grants will be awarded to 10 lucky international recipients worldwide; in different categories for their personal business development.
The objective is to make a notable change in the standard of living of people all around the Universe (From America to Europe, Asia to Africa and all around). Kindly note that you will only be chosen to receive the donation once, which means that subsequent yearly donation will not get to yo
@davidsnyder
davidsnyder / gist:7809500
Last active December 30, 2015 09:29
Change the dev-root and stick this somewhere in .emacs.d/
(defvar dev-root "/Users/davidsnyder/Development")
(defun git-current-branch ()
(substring (shell-command-to-string "git branch | grep '\*'") 2 -1))
(defun ics-github-link ()
(interactive)
(let ((
+---------------------------+-------+-------------+-----------+------------+-------------+-----------+
| Name | Chef? | State | Flavor | AZ | Env | relevant? |
+---------------------------+-------+-------------+-----------+------------+-------------+-----------+
| p1_davidcontrol-dashpot-0 | no | not running | m1.large | us-east-1d | development | - |
| p1_davidcontrol-nfs-0 | no | not running | c1.medium | us-east-1d | development | - |
| p1_davidcontrol-mongo-0 | no | not running | m1.large | us-east-1d | development | - |
| p1_davidcontrol-zabbix-0 | no | not running | m1.large | us-east-1d | development | - |
| p1_davidcontrol-vcd-0 | no | not running | c1.xlarge | us-east-1d | development | - |
| p1_davidcontrol-backup-0 | no | not running | m1.small | us-east-1d | development | - |
+---------------------------+-------+-------------+-----------+------------+--
@davidsnyder
davidsnyder / gist:7668243
Created November 26, 2013 23:35
Error on Nimbus UI
java.lang.AbstractMethodError: com.infochimps.storm.trident.ElasticsearchStateFactory.makeState(Ljava/util/Map;Lbacktype/
Tue, 26 at storm.trident.planner.SubtopologyBolt.prepare(SubtopologyBolt.java:52)
Nov 2013 at storm.trident.topology.TridentBoltExecutor.prepare(TridentBoltExecutor.java:214)
23:34:46 at backtype.storm.daemon.executor$fn__3557$fn__3569.invoke(executor.clj:659)
+0000 at backtype.storm.util$async_loop$fn__436.invoke(util.clj:375)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:662)
@davidsnyder
davidsnyder / gist:7668060
Last active May 2, 2016 14:16
Kafka Troubleshooting
You can use the consumer script to verify that data is being received by the http listener (http_producer) on port 80 of the Kafka broker node.
sudo /usr/local/share/kafka/bin/kafka-console-consumer.sh --zookeeper [zk-private-ip]:2181 --topic [topic] --from-beginning
If you curl records at the kafka http listener, you should see them come out at the kafka broker node:
(On the Kafka listener node)
curl -XGET localhost:80 -d '{"name":"Bill","position":"Sales"}'
@davidsnyder
davidsnyder / jaccard_sim.pig
Created May 17, 2012 17:28
Jaccard Similarity Score for the Netflix graph
edges = LOAD '$GRAPH' AS (user_id:chararray,movie_id:chararray);
edges_dup = LOAD '$GRAPH' AS (user_id:chararray,movie_id:chararray); -- hack for self-join
-- (user_id,|A|)
grouped_edges = GROUP edges by user_id; --reduce
outgoing_links = FOREACH grouped_edges GENERATE --map
group AS user_id,
COUNT(edges) AS user_out;
-- (movie_id,user_a_id,movie_id,user_b_id)