Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gavin Gilmour gaving

🎯
Focusing
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am gaving on github.
  • I am gaving (https://keybase.io/gaving) on keybase.
  • I have a public key ASAus1flHDIEFaLySFtJhm8D-LbShQcRlNkmqf87GlgKHQo

To claim this, I am signing this object:

@gaving
gaving / merge_flow.sh
Last active Feb 23, 2020
merge_flow.sh
View merge_flow.sh
#merge <commit/merge message>
#to be run in a dirty working tree on a feature branch
merge() {
g # status
# gcb $1
gca --signoff -m $1 # commit
gpsup # push branch and track remote
MR=$(lab mr create -d -a gaving -m $1 | tr -d -c 0-9) # create merge and store number
lab mr list # list
lab mr show $MR # show
@gaving
gaving / leaderboard.sh
Created Feb 23, 2020
duolingo leaderboard
View leaderboard.sh
leaderboard() {
http --session=duo \
GET 'https://duolingo-leaderboards-prod.duolingo.com/leaderboards/7d9f5dd1-8423-491a-91f2-2532052038ce/users/432412033?client_unlocked=true&_=1582470157128' \
| jq -r '.active.cohort.rankings[] | [.score, .display_name] | join (" ")' \
| tac \
| gsed 's/gaving/gaving 👈/g' \
| paste - \
| column \
| expand \
| bat \
View Dockerfile
FROM golang:1.13
WORKDIR /go/src/app
COPY . .
RUN make install
RUN ls
CMD ["/go/src/app/lab"]
View aliases.zsh
# find a file by filename
# fz .json fx
# fz .json "jq -C '.' | less -R"
fz() {
f $1 | fzf --bind "enter:execute(${2:-bat} {})" --preview "bat --color=always {}"
}
# find a file by content
# az ingest open
az() {
View ok.js
[ { date_of_birth: { order: 'asc' } } ]
View utils.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Convenience utility functions for NiPyApi, not really intended for external use
"""
from __future__ import absolute_import, unicode_literals
import logging
import json
View yeah.py
import json
import sys
import traceback
import csv
from java.nio.charset import StandardCharsets
from org.apache.commons.io import IOUtils
from org.apache.nifi.processor.io import StreamCallback
from org.python.core.util import StringUtil
class PyStreamCallback(StreamCallback):
@gaving
gaving / madewithreactnative.md
Last active Jun 27, 2020
madewithreactnative.md
View madewithreactnative.md

Could you introduce your app in a few sentences? What does it do, who is it for? Which platforms? Personal app or for company?

Lexi is an open source iOS app for displaying and dictating a random Greek Word of the Day, with history and favourite features.

It was developed as a learning project (primarily) and for my parents who would find a random word of the day interesting in their efforts to learn the

@gaving
gaving / speak.js
Last active Jan 27, 2018
expo Speech SDK
View speak.js
_speak = (language, text) => {
const { pitch, rate } = this.state;
const start = () => {
this.setState({ inProgress: true });
};
const complete = () => {
this.state.inProgress && this.setState({ inProgress: false });
};
You can’t perform that action at this time.