Skip to content

Instantly share code, notes, and snippets.

View brntbeer's full-sized avatar
:shipit:

Brent Beer brntbeer

:shipit:
View GitHub Profile
@brntbeer
brntbeer / opperators.lua
Created July 18, 2012 22:35
Lua operators
foo =
bar and baz and bar[baz]
or
var and var.this and var.this.that
or
nil
@brntbeer
brntbeer / business_days.rb
Created October 8, 2012 23:38
Add to Fixnum a method to compute business days from today
#!/usr/bin/env ruby
class Fixnum < Integer
# Counts a given number of business days from today
def business_days_from_today
d = Date.today
day_count = 0
while(day_count <= self)
@brntbeer
brntbeer / plusplus.coffee
Created January 24, 2013 21:20
hubot score keeping
class ScoreKeeper
constructor: (@robot) ->
@cache = { scoreLog: {}, scores: {} }
@robot.brain.on 'loaded', =>
@robot.brain.data.scores ||= {}
@robot.brain.data.scoreLog ||= {}
@cache.scores = @robot.brain.data.scores || {}
@cache.scoreLog = @robot.brain.data.scoreLog || {}
@brntbeer
brntbeer / git-update-fork.sh
Created June 17, 2013 22:04
Set up instructions to update your fork
# These instructions will set up a second remote server, fetch that data down to your
# remote tracking branches, namespaced under 'upstream/'.
# You can then checkout to your master, merge in the upstream changes, and push back to your fork (origin)
# where USER is the original owner name and ORIGINAL is the original project you forked from
git remote add upstream https://github.com/USER/ORIGINAL.git
git fetch upstream
git checkout master
git merge upstream/master
@brntbeer
brntbeer / think-it-through.md
Last active January 3, 2016 17:08
Why version Control? Built with <3 for Rails Girls (in SF)

Why even bother?

Learning to program can sometimes be a lot of pressure on a person. First you have to learn how to even program, how are these things structured? Next, you learn you should probably start learning about this cool text editor and all of its hand-contorting commands to really take your experience to the next level.

But then someone tells you "oh yeah, also take a look at Git and GitHub."

One thing at a time please, I'm new here.

I'd argue that learning about version control and it's importance should come before you try to be hip and cool with some

Keybase proof

I hereby claim:

  • I am brntbeer on github.
  • I am brntbeer (https://keybase.io/brntbeer) on keybase.
  • I have a public key whose fingerprint is DBDC CF42 9F04 CF6F 1079 36F6 1979 B007 A3C4 FE43

To claim this, I am signing this object:

@brntbeer
brntbeer / README.md
Last active August 29, 2015 14:24
generate random files. 1 commit per file. Place this in /usr/local/bin or somewhere so it can be executed

Hello OSCON

@brntbeer
brntbeer / Gemfile
Last active September 24, 2015 16:37
Some instructions on running the team_audit.rb script from https://github.com/github/platform-samples
source 'https://rubygems.org'
gem 'octokit'
@brntbeer
brntbeer / git-resources.md
Last active November 23, 2015 13:49
Set of resources for learning Git and GitHub

Installation

  • The Git-SCM Web Site (All Platforms)
  • If you're on a Mac, you can install Git automatically. To do this, open the Terminal application from spotlight and type git. This will prompt Git to install the rest of the command line tools for Git. This should only take a few minutes. It will ask if you would like to download Xcode, which you can ignore.
  • GitHub Desktop will install for Windows

Git Resources