Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View crcastle's full-sized avatar
:shipit:

Chris Castle crcastle

:shipit:
View GitHub Profile
@crcastle
crcastle / get-kindle-highlights.rb
Created January 22, 2017 23:36
Extract Kindle highlights into CSV format for https://crc.io/projects/reading
require 'kindle_highlights'
kindle = KindleHighlights::Client.new(
email_address: 'amazon@crc.io',
password: '',
mechanize_options: { user_agent_alias: 'Mac Mozilla' }
)
puts 'quote_id,quote_link,quote_text,post_title,post_link,post_author,post_author_link,post_site_link,unix_time'
kindle.books.each do |asin, title|
@crcastle
crcastle / heroku-demo.sh
Last active January 3, 2017 21:36
Heroku Fast Demo Create App and Deploy
mkdir my-app
cd my-app
echo "Hello World!" > index.php
git init
git add .
git commit -m 'Initial commit for new app'
heroku create
git push heroku master
heroku open
@crcastle
crcastle / npm-deploy (1m27s)
Created December 13, 2016 01:50
Yarn slower on initial deploy of React app?
~/s/disco-time ❯❯❯ heroku create
Creating app... done, ⬢ pure-caverns-16726
https://pure-caverns-16726.herokuapp.com/ | https://git.heroku.com/pure-caverns-16726.git
~/s/disco-time ❯❯❯ clear
~/s/disco-time ❯❯❯
~/s/disco-time ❯❯❯
~/s/disco-time ❯❯❯ time git push heroku master
~/s/disco-time ❯❯❯ time git push heroku master
Counting objects: 157, done.
@crcastle
crcastle / tweet-producer-exception.log
Created September 27, 2016 17:06
Tweet Producer Log
Sep 27 08:00:49 twitter-ingest app/web.1: [pool-3-thread-1] INFO org.apache.kafka.connect.runtime.WorkerSourceTask - Finished WorkerSourceTask{id=twitter-source-0} commitOffsets successfully in 12 ms
Sep 27 08:00:59 twitter-ingest app/web.1: [pool-3-thread-1] INFO org.apache.kafka.connect.runtime.WorkerSourceTask - Finished WorkerSourceTask{id=twitter-source-0} commitOffsets successfully in 12 ms
Sep 27 08:01:09 twitter-ingest app/web.1: [pool-3-thread-1] INFO org.apache.kafka.connect.runtime.WorkerSourceTask - Finished WorkerSourceTask{id=twitter-source-0} commitOffsets successfully in 12 ms
Sep 27 08:01:19 twitter-ingest app/web.1: [pool-3-thread-1] INFO org.apache.kafka.connect.runtime.WorkerSourceTask - Finished WorkerSourceTask{id=twitter-source-0} commitOffsets successfully in 12 ms
Sep 27 08:01:29 twitter-ingest app/web.1: [pool-3-thread-1] INFO org.apache.kafka.connect.runtime.WorkerSourceTask - Finished WorkerSourceTask{id=twitter-source-0} commitOffsets successfully in 12 ms
Sep 27 08:01:3
@crcastle
crcastle / kafka-from-cli.md
Last active August 26, 2021 13:02
Kafka CLI example using Apache Kafka on Heroku
@crcastle
crcastle / confluent.properties
Created August 11, 2016 18:13
Kafka Connect with SSL Trials and Tribulations
security.protocol=SSL
ssl.truststore.location=/app/.truststore.jks
ssl.truststore.password=test1234
ssl.keystore.location=/app/.keystore.jks
ssl.keystore.password=test1234
ssl.key.password=test1234
bootstrap.servers=ec2-52-1-245-163.compute-1.amazonaws.com:9096,ec2-52-22-254-93.compute-1.amazonaws.com:9096,ec2-52-207-158-223.compute-1.amazonaws.com:9096
rest.port=46369
# copied from Kafka Connect distribution etc/kafka/connect-standalone.properties example file
# The converters specify the format of data in Kafka and how to translate it into Connect data. Every Connect user will
@crcastle
crcastle / rtftomarkdown.rb
Created August 10, 2016 22:14 — forked from ttscoff/rtftomarkdown.rb
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
@crcastle
crcastle / gist:d22f813eef6e6f72c5280482d2c1bb58
Created April 18, 2016 05:21
Wallcat logs from Console.app
4/17/16 3:12:45.926 PM Wallcat[718]: [Error]: No results matched the query. (Code: 101, Version: 1.7.4)
4/17/16 4:12:45.657 PM Wallcat[718]: [Error]: No results matched the query. (Code: 101, Version: 1.7.4)
4/17/16 4:16:28.865 PM Wallcat[718]: CFNetwork SSLHandshake failed (-9806)
4/17/16 4:16:28.866 PM Wallcat[718]: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)
4/17/16 4:16:28.868 PM Wallcat[718]: [Error]: An SSL error has occurred and a secure connection to the server cannot be made. (Code: 100, Version: 1.7.4)
4/17/16 4:16:28.868 PM Wallcat[718]: [Error]: Network connection failed. Making attempt 2 after sleeping for 1.281514 seconds.
4/17/16 4:16:30.663 PM Wallcat[718]: [Error]: No results matched the query. (Code: 101, Version: 1.7.4)
4/17/16 10:07:28.051 PM Wallcat[718]: [Error]: No results matched the query. (Code: 101, Version: 1.7.4)
4/17/16 10:19:22.742 PM Wallcat[718]: [Error]: No results matched the query. (Code: 101, Version: 1.7.4)
4/17/16 10:19:27.672 PM Wallca
@crcastle
crcastle / keybase-error-output.txt
Created March 5, 2016 21:26
Keybase Error: Bundle version (1.0.1-20160305170047+41e7640) is less than installed version (1.0.1)
Keybase: 1.1.26
Privileged Helper: Installed, Bundle Version: 1.0.27, Version: 1.0.27
Service: Installed, Version: 1.0.14-20160305170008+41e7640, PID: 53123
Fuse: Installed, Version: 3.2.0, Kext ID: com.github.kbfuse.filesystems.kbfuse, Kext Loaded: Yes, Path: /Library/Filesystems/kbfuse.fs
KBFS: Error: Bundle version (1.0.1-20160305170047+41e7640) is less than installed version (1.0.1), Error, Version: 1.0.1, Bundle Version: 1.0.1-20160305170047+41e7640, PID: 23904
CLI: Installed
Log:
Install: Privileged Helper
Install: Service

Keybase proof

I hereby claim:

  • I am crcastle on github.
  • I am crcastle (https://keybase.io/crcastle) on keybase.
  • I have a public key ASBzm-wQB04564WCLGi23GOaccsLZ9qHkWIlrqKJrjET7wo

To claim this, I am signing this object: