Skip to content

Instantly share code, notes, and snippets.

View nickgrim's full-sized avatar
💥

Nick Grimshaw nickgrim

💥
  • Inviga
  • London, UK
View GitHub Profile
@nickgrim
nickgrim / gist:f6e5c68a99a17783096d6c911e220c15
Created May 12, 2020 19:46
Postgres SEQUENCEs and ROLLBACK
$ psql
Expanded display is used automatically.
Pager won't be used for less than 60 lines.
psql (12.2 (Ubuntu 12.2-4), server 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1))
Type "help" for help.
[local] nick@nick=# CREATE SEQUENCE test;
CREATE SEQUENCE
[local] nick@nick=# CREATE TABLE foo (id INT PRIMARY KEY DEFAULT nextval('test'));
CREATE TABLE
$ go vet main_test.go
# command-line-arguments
./main_test.go:12:1: Testsomething has malformed name: first letter after 'Test' must not be lowercase
$ go test -v
=== RUN TestSomething
upper case
--- PASS: TestSomething (0.00s)
=== RUN Test_something
underscore
--- PASS: Test_something (0.00s)
@nickgrim
nickgrim / Marshmallow.log
Last active March 6, 2024 18:30
Html.fromHtml() on Android Nougat shows different behaviour to that of Android Marshmallow
I/TAG: opening: true, tag: html
I/TAG: opening: true, tag: body
I/TAG: opening: true, tag: ol
I/TAG: opening: true, tag: li
I/TAG: opening: false, tag: li
I/TAG: opening: false, tag: ol
I/TAG: opening: true, tag: ul
I/TAG: opening: true, tag: li
I/TAG: opening: false, tag: li
I/TAG: opening: false, tag: ul

Keybase proof

I hereby claim:

  • I am nickgrim on github.
  • I am nickgrim (https://keybase.io/nickgrim) on keybase.
  • I have a public key ASA_TaSJfyphzpENwR_2YDzRqelaIf67FfdsOy8a4feuFAo

To claim this, I am signing this object:

@nickgrim
nickgrim / gist:8e00785d677a9126c2eb
Created May 29, 2015 10:33
git config -l | grep alias
alias.st=status
alias.ff=merge --ff-only
alias.no-ff=merge --no-ff
alias.last=log -1 HEAD
alias.tags=for-each-ref --sort='*authordate' --format='%(refname:short): %(subject)' refs/tags
alias.changelog=log --pretty=format:' * %s' --topo-order --reverse --no-merges
alias.ignore=update-index --skip-worktree
alias.ignored=!git ls-files -v | egrep ^S
alias.unignore=update-index --no-skip-worktree