Skip to content

Instantly share code, notes, and snippets.

View davidbarkhuizen's full-sized avatar
🧐

david barkhuizen davidbarkhuizen

🧐
  • .za
View GitHub Profile
@davidbarkhuizen
davidbarkhuizen / ubuntu_serial_to_usb_terminal.txt
Last active November 2, 2018 08:35
serial to usb terminal in ubuntu
1. install putty (or minicom)
$ sudo apt install putty
2. plug in usb-to-serial cable
3. to check which serial port has been crested, run dmesg pipe output to grep, filter to tty, note output
(man dmesg => print or control the kernel ring buffer)
$ dmesg | grep tty
sample ouput:
@davidbarkhuizen
davidbarkhuizen / docker.md
Last active October 14, 2022 13:05
docker

heirarchy

  • registry -- repo --- image ---- tag (version)

find name of docker servce in windows

sc queryex type= service state= all | find /i "docker"

get docker version

@davidbarkhuizen
davidbarkhuizen / that_green_curry_recipe.txt
Created October 16, 2018 15:05
thai green curry recipe
THAI GREEN CURRY
Ingredients
1 tbsp vegetable oil
2 tbsp green curry paste (according to taste)
1 tbsp soft dark brown sugar
1-2 thick stalks lemongrass, fat ends bashed with a rolling pin (optional)
750g skinless, boneless chicken, cut into chunks (use breast and/or leg meat)
6-8 lime leaves, torn into pieces (if unavailable, use the grated zest of 1 lime)
@davidbarkhuizen
davidbarkhuizen / vscode.md
Last active October 14, 2022 13:06
vscode

open cmd palette ctrl + shift + p

format code

collapse all ctrl + (k,0) expand all ctrl + (k,j)

navigate

navigate to next alt + right

@davidbarkhuizen
davidbarkhuizen / ubuntu 1804
Created July 15, 2018 04:58
ubuntu 1804 install, config & customization
configure laptop lid-close power behaviour
1. edit systemd config file @ /etc/systemd/logind.conf
2. uncomment & edit line a required
3. restart machine
@davidbarkhuizen
davidbarkhuizen / custom URI protocols in windows
Created December 21, 2017 05:55
custom URI protocols in windows
>>>
Registering an Application to a URI Scheme
https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
To register an application to handle a particular URI scheme, add a new key, along with the appropriate subkeys and values, to HKEY_CLASSES_ROOT. The root key must match the URI scheme that is being added. For instance, to add an "alert:" scheme, add an alert key to HKEY_CLASSES_ROOT, as follows:
HKEY_CLASSES_ROOT
alert
URL Protocol = ""
@davidbarkhuizen
davidbarkhuizen / intellij scala cheat sheet
Last active April 13, 2018 11:50
intellij cheat sheet
NAVIGATION
# navigate to symbol definition cmd + B
# navigate backwards cmd + opt + left
# navigate forwards cmd + opt + right
# goto class cmd + O
# goto file shift + cmd + O
# goto symbol cmd + opt + O
@davidbarkhuizen
davidbarkhuizen / java infrastructure cheat sheet
Last active November 24, 2017 07:55
java infrastructure cheat sheet
# uninstall java 9 on osx
https://www.java.com/en/download/help/mac_uninstall_java.xml
(confirm folder parths first)
$ sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
$ sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
$ sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@davidbarkhuizen
davidbarkhuizen / linux.md
Last active October 14, 2022 13:06
linux

find files matching expression

e.g. all .dll files in .

$ find . -name "*.dll"

copy directory and contents recursively

$ cp -R source destination/

list processes

-A include processes for all users

@davidbarkhuizen
davidbarkhuizen / sbt cheat sheet
Last active November 24, 2017 10:11
scala build tool cheat sheet
# sbt version
sbt sbt-version
or
sbt sbtVersion
# get scala version from sbt
$ sbt
[project] $ scala-version