Skip to content

Instantly share code, notes, and snippets.

View adamlutz's full-sized avatar

Adam Lutz adamlutz

View GitHub Profile
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@adamlutz
adamlutz / gist:443ce5eef0df99a909caf0596257b9d0
Created October 5, 2023 02:04
postrgres.app pg bundler config fix
bundle config build.pg --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
@adamlutz
adamlutz / config.fish
Last active January 23, 2021 17:35
config.fish (git)
set -x PATH /opt/homebrew/bin $PATH
set -x PATH /usr/local/bin $PATH
set -x PATH /usr/local/sbin $PATH
set -x PATH ~/bin $PATH
set -x PATH /Applications/Postgres.app/Contents/Versions/latest/bin $PATH
set PATH $HOME/.rbenv/shims $PATH
set PATH $HOME/.rbenv/bin:$PATH
rbenv rehash >/dev/null ^&1
status --is-interactive; and source (rbenv init -|psub)
@adamlutz
adamlutz / prompt.fish
Last active January 23, 2021 17:35
git fish prompt
# use custom function instead of fish built in git prompt due to performance
# (fish git prompt uses diff which can be slow)
function git_prompt
# uses simple grep and colrm instead of complicated sed regex
set -l branch (git branch 2> /dev/null | grep --color=never -e '*.\(.*\)' | colrm 1 2)
# use git status to improve performance (instead of using diff)
# [MADRC] - if file is modified
# ? - if untracked file exists
set -l git_dirty (git status -s | colrm 3 | colrm 1 1 | grep --color=never -e '[MADRC]')
$ defaults write com.apple.finder AppleShowAllFiles -bool true
@adamlutz
adamlutz / mechanized_search.rb
Last active June 2, 2016 18:27
mechanized cancer.gov search
require 'rubygems'
require 'ruby-progressbar'
require 'mechanize'
require 'pry'
require 'csv'
agent = Mechanize.new { |agent|
agent.user_agent_alias = 'Mac Safari'
}
@adamlutz
adamlutz / sublime.config
Last active January 4, 2016 17:24
sublime config
{
"ensure_newline_at_eof_on_save": true,
"ignored_packages":
[
"Vintage"
],
"trim_trailing_white_space_on_save": true,
"tab_size": 2,
"translate_tabs_to_spaces": true,
}
install meteor
deploy app to meteor cloud
$ meteor build ~/Meteor/ \
--server=lutz.meteor.com
install android studio: http://developer.android.com/sdk/installing/index.html?pkg=studio
start new project + create AVD from API 22.
$ brew install android-platform-tools
$ meteor add-platform android
@adamlutz
adamlutz / config.fish
Last active February 24, 2017 01:32
~/.config/fish/config.fish
set PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1
status --is-interactive; and source (rbenv init -|psub)
set -x PATH /usr/local/bin $PATH
set -x PATH /usr/local/sbin $PATH
set -x PATH ~/bin $PATH
set -x PATH /Applications/Postgres.app/Contents/Versions/latest/bin $PATH
@adamlutz
adamlutz / github-issues-csv-export.rb
Created October 28, 2015 21:25
github-issues-csv-export.rb
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="name"
PASSWORD="sekret"
# Project you want to export issues from
USER="gokart"
PROJECT="mayo-rx"