Skip to content

Instantly share code, notes, and snippets.

View BonfaceKilz's full-sized avatar
💭
Scheme-ing ❤️

BonfaceKilz BonfaceKilz

💭
Scheme-ing ❤️
View GitHub Profile
@BonfaceKilz
BonfaceKilz / emacs_cheatsheet.org
Last active January 15, 2017 20:27
Emacs cheatsheet

Macro: How to record and play

  1. Start recording a macro by pressing #C-X (#

High Level Steps to Record and Play inside Emacs

  1. C-x ( : Start recording a macro
  2. C-x ) : Stop recording a macro
  3. C-x e : Play last recorded macro

Naming and Saving macros, and playing later

  1. C-x C-k n : naming a macro
  2. M-x <macro-name> : run the named
@BonfaceKilz
BonfaceKilz / running_jekyll.org
Created December 29, 2016 05:49
Working with Jekyll

To kill a server instance, just run kill -9 1234 where 1234 is the pid of the server(ps aux | grep jekyll | cut -d" " -f3)

@BonfaceKilz
BonfaceKilz / mask.md
Created December 29, 2016 15:14
Masking- All you need to know in order to understand what masking is in a nutshell

A mask defines what mask you want to keep, and which bits you want to clear. Masking is the act of applying a mask to a value. This is accomplished by:

  1. Bitwise ANDing in order to extract a subset of the bits in the value
  2. Bitwise ORing in order to set a subset of the bits in the value
  3. Bitwise XORing in order to toggle a subset of the bits in the value
@BonfaceKilz
BonfaceKilz / wine_display_quickfix.md
Last active December 30, 2016 17:43
Fixing wine display issues

Appending vblank_mod=0 to wine fixed issues when running Proteus like so:

vblank_mode=0 wine .wine/drive_c/Program\ Files\ \(x86\)/Labcenter\ Electronics/Proteus\ 7\ Professional/BIN/ISIS.EXE

Navigate to System > Set Display Options then choose Use Windows GDI Graphics.

@BonfaceKilz
BonfaceKilz / FD.md
Last active January 1, 2017 14:47
File Descriptors in bash- a quick primer with file descriptors in bash

File descriptor copying
[x]>&y, [x]<&y
Make FD x write to/ read from FD y's stream

Appending file redirection
[x]>>file
Make FD x= append to end of file

Redirecting standard output and standard error
&amp;&gt;file

@BonfaceKilz
BonfaceKilz / bash_variables.org
Last active January 1, 2017 16:02
Bash shell expansion- Quick reference
OperatorMeaning
${parameter#pattern}Remove the shortest string that matches the pattern if it’s at the start of the value
${parameter##pattern}Remove the longest string that matches the pattern it it’s at the start of value
${parameter%pattern}Remove the shortest string that matches the pattern if it’s at the end of the value
${parameter%%pattern}Remove the longest string that matches the pattern it it’s at the end of value
${parameter/pattern/replacement}Replace the first string that matches the pattern with the replacement
${parameter//pattern/replacement}Replace each string that matches the /pattern/with the replacement
${parameter/#pattern/replacement}Replace the string that matches the pattern at the beginning of t
@BonfaceKilz
BonfaceKilz / laravel_noob.md
Created January 4, 2017 18:26
Some quick notes for working from another existing laravel project
# For installing dependencies to vendor/
composer install

# Spinning up the server
php artisan serve

# Setting up the db
php artisan migrate
php artisan db:seed
@BonfaceKilz
BonfaceKilz / speak.md
Last active January 9, 2017 17:41
Speak

Something I wrote from some really weird social challenge on tonguetwisters I've been seing everywhere.

espeak "Tongue Twister challenge with some bit of help. Here goes: The sixth sick sheikh's sixth sheep's sick" --stdout | ffmpeg -i - -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 final.mp3
@BonfaceKilz
BonfaceKilz / vncviewer.md
Created January 18, 2017 16:48
Setting up a vnc to control another person's desktop
sudo pacman -S x11vnc
x11vnc -display :0 auth ~/.Xauthority

Set up any vnc viewer on the host machine

Finally run:

vncviewer :0