Skip to content

Instantly share code, notes, and snippets.

View wisetara's full-sized avatar

Tara Scherner de la Fuente wisetara

  • Portland, OR
View GitHub Profile
@wisetara
wisetara / copr.md
Created April 11, 2016 19:09 — forked from gvaughn/copr.md
git copr alias

I'd like to share some git aliases that you might find useful if you handle pull requests from others.

Add these to your ~/.gitconfig in the [alias] section:

copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f"
prunepr = "!git for-each-ref refs/heads/pr-* --format='%(refname:short)' | while read ref ; do git branch -D $ref ; done"

Now you can "git copr #{pr_number}" (check out pull request is the mnemonic) and it will pull down the PR in a local branch of pr-#{pr_number} and check it out for you. To do it right, you must pronounce it "Copper" with a James Cagney gangster accent.

@wisetara
wisetara / clone_dbc_repo.rb
Created December 14, 2017 14:43 — forked from user512/clone_dbc_repo.rb
clone dbc repo
require 'json'
def clone_repo
page_num = 1
loop do
# replace sf-grasshoppers-2015 with your cohort name
json = %x[curl 'https://api.github.com/orgs/sf-grasshoppers-2015/repos?per_page=100&page=#{page_num}' -u <username>:<personal_access_token>]
json = JSON.parse(json)
break if json.empty?
json.each { |repo| %x[git clone #{repo["ssh_url"]} ] }
page_num += 1
@wisetara
wisetara / The Technical Interview Cheat Sheet.md
Created February 11, 2018 21:14 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
package auth
import (
"context"
"net/http"
"strings"
"google.golang.org/grpc/metadata"
"github.com/andela/micro-api-gateway/pb/authorization"