Skip to content

Instantly share code, notes, and snippets.

func TestNoProjects(t *testing.T) {
db := Setup(t)
pr := &GormProjectRepository{DB: db}
// Don't add any projects
// Test
allProjects := GetProjects(pr)
if len(allProjects) > 0 {
t.Errorf("Shouldn't have any projects, but got: %+v\n", allProjects)
@creativenull
creativenull / mini_init.vim
Last active February 28, 2021 20:20
The bare bones, bring your own plugin manager, theme, vim configuration - opinionated of course
" Minimal vim config
" =============================================================================
filetype plugin indent on
" =============================================================================
" = Plugin Manager =
" =============================================================================
" Use any plugin manager here
@jmoyers
jmoyers / 1. README.md
Last active June 23, 2023 17:00
Get up and running with a terminal, vim, and c++
  • color scheme
  • terminal
  • z proj, takes you to /some/deep/directory/project
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@blaskovicz
blaskovicz / template.html
Created June 30, 2017 18:01
Golang template features (nested variables, range over array, index into map, conditionals)
<div class="levels">
{{ $groups := .LevelGroups }}
{{ $groupedLevels := .Levels }}
{{ $completeLevels := .CompleteLevels }}
{{ if $groupedLevels }}
{{ range $group := $groups }}
<div class="intro"><h2>{{$group}}</h2></div>
{{ range index $groupedLevels $group }}
<a href="/level/{{.Number}}" class="{{if index $completeLevels .Number}}complete{{end}}">
<span class="level">{{.Number}} </span>