Skip to content

Instantly share code, notes, and snippets.

@karl-gustav
karl-gustav / My_languages.txt
Last active November 14, 2016 09:06
List of languages I know
Scale: 3 - fluent, 2 - proficient, 1 - novice, 0 - want to learn
JavaScript 1
Python 1
Java 1 (also I hate it)
Groovy 1
Bash 1
SQL 1 (longe time since i used it)
Go 3
Swift 2
@karl-gustav
karl-gustav / fix.md
Last active November 28, 2016 11:31
How to edit the default sound files in OSX
  1. command + r
  2. terminal
  3. csrutil disable
  4. <make changes>
  5. csrutil enable
@karl-gustav
karl-gustav / .bash_aliases
Last active March 23, 2017 11:43
2017-03-23 Config files osX
# Git
alias hist='git hist'
alias st='git status'
alias gk='gitk &'
alias gka='gitk --all &'
alias arcdiff='arc diff'
alias arccreate="arc diff --create --reviewers '#ghostbusters'"
# Other
alias ll='ls -lh'
@karl-gustav
karl-gustav / -etc-network-interfaces
Created June 20, 2017 20:44
How to setup static IP in raspberry pi
auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 10.0.0.5
netmask 255.255.255.0
Make sure that getty doesn't run (this might only matter for ttyAMA0)
trying latest version of https://github.com/riptideio/pymodbus (installing using python setyp.py install
@karl-gustav
karl-gustav / debounce.js
Created August 24, 2017 06:12
Standalone debounce function
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
@karl-gustav
karl-gustav / fstab
Created November 26, 2017 13:13
permissive fstab (i.e. don't fail or wait for missing disks) /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=fe679315-e5fe-48bc-992a-cf9211b0ce73 / ext4 errors=remount-ro 0 1
@karl-gustav
karl-gustav / smb.conf
Created November 26, 2017 13:14
my smb.conf file
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
@karl-gustav
karl-gustav / restic.prune.log
Created December 5, 2017 20:27
restic prune log
2017/12/05 19:49:09 restic/main.go:66 main.main 1 main []string{"/home/kg/bin/restic.debug", "-r", "b2:mini-server-backup-bucket:/important/", "prune"}
2017/12/05 19:49:09 restic/main.go:67 main.main 1 restic 0.7.3 (v0.7.3-237-g06bd606d), compiled with go1.9 on linux/386
2017/12/05 19:49:09 restic/global.go:494 main.open 1 parsing location b2:mini-server-backup-bucket:/important/
2017/12/05 19:49:09 restic/global.go:477 main.parseConfig 1 opening b2 repository at b2.Config{AccountID:"<removed>", Key:"<removed>", Bucket:"mini-server-backup-bucket", Prefix:"important", Connections:0x5}
2017/12/05 19:49:09 b2/b2.go:45 b2.Open 1 cfg b2.Config{AccountID:"<removed>", Key:"<removed>", Bucket:"mini-server-backup-bucket", Prefix:"important", Connections:0x5}
2017/12/05 19:49:09 debug/round_tripper_debug.go:77 debug.loggingRoundTripper.RoundTrip 1 ------------ HTTP REQUEST -----------
GET /b2api/v1/b2_authorize_account HTTP/1.1
Host: api.backblazeb2.com
User-Agent: blazer/0.2.1
Authorization: Basic <removed>
@karl-gustav
karl-gustav / faces.txt
Last active March 16, 2018 13:05
Good unicode text faces
(ง'̀-'́)ง
¯\_(ツ)_/¯
ಠ_ಠ
(ಥ﹏ಥ)
(ᵔᴥᵔ)
(¬‿¬)
ಠ╭╮ಠ
◉_◉
( ಠ ͜ʖರೃ)
༼ つ ◕_◕ ༽つ