Skip to content

Instantly share code, notes, and snippets.

View ticean's full-sized avatar

Ticean Bennett ticean

View GitHub Profile
@ticean
ticean / jon-roam-daily-template.md
Created February 28, 2020 05:57 — forked from jborichevskiy/jon-roam-daily-template.md
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]] [[2/24 -- 3/1/2020]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • [[What's one thing top of mind today?]]
    • [[What's the one thing I need to get done today to make progress?]]
  • Agenda
    • {{[[TODO]]}} 2 hours focused time
    • {{[[TODO]]}} Read 30 minutes #goal-learning #habit
  • Health & self-care
  • {{[[TODO]]}} 30 minutes outside #goal-health #habit
@ticean
ticean / inventory-data-flow.txt
Last active June 27, 2019 22:49 — forked from impactmass/inventory-data-flow.txt
sequence diagram for reaction inventory data flow
title Inventory Data Flow
participant Kafka Topic
participant Shippable-Inventory-Plugin
participant Simple-Inventory-Plugin
participant Inventory
participant MongoDB SimpleInventory
participant MongoDB Products
participant MongoDB Orders
@ticean
ticean / kafka-cheat-sheet.md
Created April 29, 2019 19:41 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@ticean
ticean / postgres_queries_and_commands.sql
Created August 1, 2017 00:11 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@ticean
ticean / 00_destructuring.md
Created August 13, 2016 19:26 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ticean
ticean / heroku.coffee
Created December 1, 2012 18:55 — forked from johnbeynon/heroku.coffee
Heroku Hubot Script
# A limited way to interact with the Heroku API.
#
# INSTALLATION:
# 1. Create file in scripts folder in hubot folder
# 2. Update package.json for hubot and add dependency on "sprintf": "0.1.1"
# 3. Set heroku config variable HEROKU_USER to heroku user account to use
# 4. Set heroku config variable HEROKU_APIKEY to heroku user account apikey (from My Account page)
#
# heroku status - Retrieve the most recent tweet from the @herokustatus account
# heroku ps --app <appname> - Get process information for application
@ticean
ticean / README.md
Created December 28, 2011 23:57 — forked from fnichol/README.md
Vagrantify: Create a chef-solo enabled Vagrant virtual machine for development

Installation

gem install thor
mkdir -p ~/vagrants && cd ~/vagrants
curl -LO https://raw.github.com/gist/1528832/vagrantify
chmod 755 vagrantify

Usage

./vagrantify init webserver

@ticean
ticean / recipe.rb
Created December 16, 2011 09:26 — forked from casualjim/recipe.rb
S3 File Resource for Chef
# Source accepts the protocol region:// with the host as the bucket
# access_key_id and secret_access_key are just that
# for the eu-west-1 region:
s3_file "/var/bulk/the_file.tar.gz" do
source "s3-eu-west-1://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"
@ticean
ticean / update_dns.rake
Created December 2, 2011 22:33 — forked from mpasternacki/update_dns.rake
Rake task to update Amazon Route53 DNS from by Chef node search
# -*- ruby -*-
# Needs following parameters configured in rake.rb:
# DNS_DOMAIN: domain for which to set entries, including trailing dot
# (e.g. "example.com.")
# DNS_ATTRIBUTE: attribute containing hostname to CNAME to, defaults
# to 'fqdn'; for EC2, use "ec2.public_hostname"
# DNS_ENTRIES: hash mapping hostname to node search query,
# e.g. {'buildbot' => 'recipes:buildbot', 'monitoring' =>
# 'roles:monitoring'}