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