Skip to content

Instantly share code, notes, and snippets.

View zacharydanger's full-sized avatar
🥔
POTATO!

Zachary Danger zacharydanger

🥔
POTATO!
View GitHub Profile
@zacharydanger
zacharydanger / restart-spotlight-index.sh
Created September 20, 2017 12:59
Restart macOS Spotlight indexing, because sometime it sucks
#!/bin/bash
sudo mdutil -a -i off
sudo mdutil -a -i on
@zacharydanger
zacharydanger / bloggy-blog-blog.sh
Created February 5, 2015 14:37
My tmux script for blogging
#!/bin/bash
SESSION=blog
PROJECT_DIR=~/Projects/zdc
tmux has-session -t $SESSION
if [ $? != 0 ]
then
echo "Creating a new session. This shit's going to be dope."
tmux new-session -s $SESSION -n editor -d
@zacharydanger
zacharydanger / keybase.md
Created August 13, 2014 20:51
keybase verification

Keybase proof

I hereby claim:

  • I am zacharydanger on github.
  • I am zacharydanger (https://keybase.io/zacharydanger) on keybase.
  • I have a public key whose fingerprint is 44FD 92E9 CA3A 4C07 71BB A6DA 74F1 908F 65C6 B6A3

To claim this, I am signing this object:

@zacharydanger
zacharydanger / filament.sh
Created May 6, 2013 13:23
My tmux launch script for the filament project.
#!/bin/bash
tmux detach
tmux has-session -t filament
if [ $? != 0 ]
then
tmux new-session -s filament -n editor -d
tmux send-keys -t filament 'cd ~/Sites/filament' C-m
@zacharydanger
zacharydanger / gist:5206601
Created March 20, 2013 17:27
My Chef dilemma
# my problem is thus:
# I need to run the 'php::source' recipe before I run `pecl install yaml`, otherwise pecl isn't installed yet.
# My first attempts are going something like
include_recipe "php::source"
`pecl install yaml` # except this explodes because php::source hasn't been run *yet*
# So I tried getting rid of the include_recipe line and having a run list of:
site "http://community.opscode.com/api/v1"
cookbook "1kb_workstation",
:git => "https://github.com/1000Bulbs/1kb_workstation.git"
cookbook "pivotal_workstation",
:git => "https://github.com/1000Bulbs/pivotal_workstation.git"
@zacharydanger
zacharydanger / io.redis.redis-server.plist
Created May 15, 2012 21:13
redis-server plist for os x
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.redis.redis-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/redis-server</string>
<string>/etc/redis/redis.conf</string>
@zacharydanger
zacharydanger / redis-server.sh
Created May 9, 2012 14:59
/etc/init.d/redis-server
#!/bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: God
### END INIT INFO
@zacharydanger
zacharydanger / .gitconfig
Created March 13, 2012 21:24
my git config for colors
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@zacharydanger
zacharydanger / smtp.rb
Created February 9, 2012 14:38
Sample Rails ActionMailer config/initializer
# this file should be config/initializers/smtp.rb
config_file = File.join(Rails.root.to_s, '/config/smtp.yml')
if File.exists? config_file
if smtp_config = YAML.load_file(File.expand_path(config_file))[Rails.env]
MyApp::Application.config.action_mailer.delivery_method = :smtp
MyApp::Application.config.action_mailer.smtp_settings = smtp_config
end
end