Skip to content

Instantly share code, notes, and snippets.

View ganiszulfa's full-sized avatar
🏠
Working from home

Ganis Zulfa Santoso ganiszulfa

🏠
Working from home
View GitHub Profile
@ganiszulfa
ganiszulfa / gist:42aeef96e3e1ec4b3c784d203e3393b5
Created April 9, 2017 02:12 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@ganiszulfa
ganiszulfa / tmux.md
Created June 23, 2016 07:57 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@ganiszulfa
ganiszulfa / ctags.setup
Created December 16, 2015 00:49 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@ganiszulfa
ganiszulfa / _readme.md
Last active April 19, 2017 09:41 — forked from shime/_readme.md
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@ganiszulfa
ganiszulfa / gist:c9fb6b92bd1b1b2f5719
Created January 6, 2015 01:13
make a dtb for dom0
our WORKING code is in ~/code/milestone141117/linux-kvm-arm/exynos5250-arndale.dts
$ ./scripts/dtc/dtc -O dtb -o [nama dtb].dtb \
[lokasi dts].dts
1. what is !! (double exclamation mark) in C language?
It is just a unary NOT then a unary NOT again.
The effect of this is that it will transform the output of that incredibly long-named function
into either 1 or 0. If the return value of the function is greater (or less) than 0, double NOT
will produce 1. If it is 0 then double NOTing it will produce 0.
2. Why do a lot of #defines in the kernel use do { ... } while(0)?