Skip to content

Instantly share code, notes, and snippets.

View davidbarkhuizen's full-sized avatar
🧐

david barkhuizen davidbarkhuizen

🧐
  • .za
View GitHub Profile
@davidbarkhuizen
davidbarkhuizen / git rebase merge branch workflow
Last active June 22, 2016 18:17
git rebase merge branch workflow
tldr;
to incorporate changes from branch feature_branch into the master branch, retaining commits in master that occurred
subsequent to branching:
$ git checkout master
$ git pull origin
$ git checkout feature_branch
$ git rebase master
[ # if a conflict is found in /model/user.js, then manually resolved
$ rmdir --ignore-fail-on-non-empty ~/.local/share/gvfs-metadata
Nautilus > Edit -> Preferences -> Views (tab) -> View New Folders Using > List View
@davidbarkhuizen
davidbarkhuizen / rpi.md
Last active February 2, 2021 11:21
raspberry pi

Raspberry Pi

Specs

Pi 3 Model B

CPU

Aspect Spec
Arch ARM RISC ?
sublime text 3 - cheat sheet
# search for and goto file
ctrl + p
# goto definition
F12
# filter to exclude folder name xxx from search
Where: -*/xxx/*
# install python postgresql interface libraries
python2:
$ sudo apt-get install python-psycopg2
python3:
$ sudo apt-get install python3-psycopg2
# login to psql
$ sudo -u postgres psql postgres
FILES
# hackerrank.com > data structures > arrays > array manipulation
# https://www.hackerrank.com/challenges/crush/problem
# this python3 solution passes for tests 0 .. 6,
# but gives runtime errors for tests 7 .. 13
# while at least test 13 passes on my local machine
#!/bin/python3
import sys
@davidbarkhuizen
davidbarkhuizen / scala_resources.txt
Last active October 14, 2017 12:10
scala resources
scala
======
installation (ubuntu)
---------------------
# install jdk
$ sudo apt-get install default-jdk
# install scala lang infrastructure
REDUCERS
https://redux.js.org/docs/basics/Reducers.html
>> the reducer must be pure. Given the same arguments, it should calculate the next state and return it. No surprises. No side effects. No API calls. No mutations. Just a calculation. <<
BIZ LOGIC - Where Should it Live: in ActionCreators or i Reducers ?
@davidbarkhuizen
davidbarkhuizen / ssh-notes.md
Last active October 13, 2022 08:46
ssh-notes

configuring different ssh keys for different servers

  1. create entry in config file @ ~/.ssh/config:

Host host_alias HostName host_name IdentityFile ~/.ssh/rsa_pvt_key User user_name

git

branch

list all (local + remote) branches

$ git branch -a

create local tracking branches for all remote branches