Skip to content

Instantly share code, notes, and snippets.

View timhugh's full-sized avatar

Tim Heuett timhugh

View GitHub Profile
@timhugh
timhugh / microsoft_oauth_example.rb
Last active September 24, 2020 21:24
Example of oauth authentication via office 365
# frozen_string_literal: true
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'hanami-router'
gem 'httparty'
gem 'pry'
gem 'rack'
@timhugh
timhugh / ..conan-example.txt
Last active September 10, 2020 20:53
Example project with conan.io
A simple web server using cpp-httplib to demonstrate using conan.io to manage dependencies.
Install conan first: https://docs.conan.io/en/latest/installation.html
(I used homebrew: `brew install conan`)
@timhugh
timhugh / commands.sh
Created December 31, 2019 22:08
Kafka CLI Cheatsheet
# Selecting a server
kafka-topics --bootstrap-server kafka:9092
kafka-console-producer --broker-list kafka:9092
kafka-console-consumer --bootstrap-server kafka:9092
# Managing topics
kafka-topics --list
kafka-topics --describe --topic topic.name

Keybase proof

I hereby claim:

  • I am timhugh on github.
  • I am timhugh (https://keybase.io/timhugh) on keybase.
  • I have a public key ASCrmeBo73ChyS7_qmttBFJJKq3Z0DDci8438kN_vjGHmgo

To claim this, I am signing this object:

@timhugh
timhugh / .tmux.conf
Last active April 19, 2018 21:14
tmux config
# source config
bind r source-file ~/.tmux.conf
# change command prefix
set -g prefix C-a
bind C-a send-prefix
unbind C-b
# no auto-renaming of windows
set-option -g allow-rename off
@timhugh
timhugh / handlebars-example.html
Last active December 5, 2016 21:53
Using Handlebars to insert values into html templates
<!DOCTYPE html>
<html>
<head>
<style>
.output {
border: solid 1px #000;
font-family: monospace;
}
</style>
</head>
@timhugh
timhugh / .gitconfig
Last active April 19, 2018 21:13
Git config
[core]
editor = vim
excludesfile = ~/.gitignore
[user]
name = Tim Heuett
email = tim.heuett@gmail.com
[push]
default = simple
[credential]
helper = osxkeychain
@timhugh
timhugh / ruby smtp gmail
Last active March 24, 2017 18:59
sending mail through gmail using net/smtp
require 'net/smtp'
msg = "Subject: Hi There!\n\nThis works, and this part is in the body."
smtp = Net::SMTP.new 'smtp.gmail.com', 587
smtp.enable_starttls
smtp.start(your_domain, your_account_name, your_password, :login) do
smtp.send_message(msg, from_address, to_address)
end