Skip to content

Instantly share code, notes, and snippets.

Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@crcastle
crcastle / git-svn notes.txt
Created March 12, 2012 18:26 — forked from dcarney/git-svn notes.txt
Some hastily-scribbled notes about using git-svn with our existing git repos
Set the SVN_EDITOR var:
# export SVN_EDITOR=vim
==================================
SETTING UP A NEW SVN PROJECT
==================================
Create a new SVN "repo" (aka folder):
(NOTE: https is required for our new SVN, as well as --username)
# svn mkdir https://some/url/path/to/newRepo --username first.last
@crcastle
crcastle / prompt_purewildcherry_setup.zsh
Created June 22, 2018 17:58
Heroku customized command prompt with ZSH and Prezto
# Pure
# by Sindre Sorhus
# https://github.com/sindresorhus/pure
# MIT License
# For my own and others sanity
# git:
# %b => current branch
# %a => current action (rebase/merge)
# prompt:
@crcastle
crcastle / volition-build-log-fail.sh
Created February 13, 2018 20:08
Volition build failing on Heroku
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.4.0
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Your Gemfile lists the gem premailer-rails (>= 0) more than once.
You should probably keep only one of them.
@crcastle
crcastle / server.js
Last active January 24, 2018 21:23
Simplest Node.js Web Server
const http = require('http')
const PORT = 3000
const requestHandler = (request, response) => {
response.end('Hello World!')
}
const server = http.createServer(requestHandler)
server.listen(PORT, (err) => {
@crcastle
crcastle / commands.sh
Last active January 10, 2018 19:54
Heroku: Scale from 0 to 100 servers in 5 minutes
# Prep
# Do this in a team, not personal app, because we don't want to use Free/Hobby
export HEROKU_ORGANIZATION=demo-org
####### Start Demo Here
# I'm going to deploy a simple app to Heroku
# Add a new "feature"
# Scale it up to 100 servers (cause our company got mentioned on Techcrunch!)
# Then scale it down to 20 (to save $$$ since the load has gone down)
# And I'm going to do all this in less than 5 minutes (might need to be 7 or 10 min)
@crcastle
crcastle / gist:9b6512564c9660cbfac8420833253644
Created December 8, 2017 20:31
kafka-streams-test word count
  ~/src/kafka-streams-on-heroku  master 🌷  59s
👉 h kafka:topics:write tombigbee-17823.textlines "the quick brown fox jumps over the lazy dog" -a kafka-streams-test
  ~/src/kafka-streams-on-heroku  master 🌷 
👉 heroku pg:psql -c 'select * from windowed_counts' HEROKU_POSTGRESQL_URL -a kafka-streams-test
--> Connecting to postgresql-vertical-36453
┌────┬───────────────┬───────┬───────┐
│ id │ time_window │ word │ count │
├────┼───────────────┼───────┼───────┤
│ 21 │ 1512765050000 │ brown │ 1 │
@crcastle
crcastle / jsconf-eu-demos.md
Last active May 5, 2017 14:45
Some Node/JavaScript One-Click Heroku Deploys
@crcastle
crcastle / devoxx-demos.md
Last active March 21, 2017 04:51
Some Java One-Click Heroku Deploys
@crcastle
crcastle / yarn_lock.sql
Created March 15, 2017 20:14
Google BigQuery SQL query for yarn.lock
SELECT
repo_name,
COUNT(repo_name) AS count
FROM
[bigquery-public-data:github_repos.files]
WHERE
path LIKE 'yarn.lock'
GROUP BY
Repo_name