Skip to content

Instantly share code, notes, and snippets.

View davidbarkhuizen's full-sized avatar
🧐

david barkhuizen davidbarkhuizen

🧐
  • .za
View GitHub Profile
# install bluez-tools
$ sudo apt-get install bluez-tools
# list bt devices
$ bt-device -l
@davidbarkhuizen
davidbarkhuizen / scala.md
Last active October 14, 2022 13:06
scala
@davidbarkhuizen
davidbarkhuizen / mac.md
Last active November 9, 2022 13:34
mac

mac os

window management

full-screen
ctrl + cmd + F

minimize current window
cmd + M

from https://www.inksaver.co.za
https://www.inksaver.co.za/en/blog/Reset-the-Toner-Life-End-Message-on-Your-Brother-Printer.php
>>>
So you’ve just replaced your Brother toner cartridge in your printer and the 'toner low' or 'replace toner' warning keeps popping up. You’ve tried everything. You’ve taken the toner cartridge out and checked everything is working and all the packaging has been removed. You’ve shaken the cartridge from side to side. You’ve even switched the printer on and off and nothing is making that irritating little message go away. There’s nothing in the user manual to tell you what to do. And worst of all, even though you know the toner cartridge is new, the printer still won’t let you print!
Brother toner cartridges
Relax. Most Brother toner printers need to be told you’ve replaced the toner cartridge. You’ll have to manually reset the counter and, luckily, this is fairly easy to do. We’ve put together a handy list of Brother toner printers and how to reset the toner count on them.

git

branch

list all (local + remote) branches

$ git branch -a

create local tracking branches for all remote branches

@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

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 / 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
# 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
# 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