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 / 1_basic_installation.md
Last active January 24, 2017 20:01
Setting up SD card and installing a simple desktop environment for raspberryPi
# See what devices are currently mounted
df -h 
# or alternatively
lsblk

# Unmount the SD card
umount /dev/sdXX

# Writing image to SD card
@BonfaceKilz
BonfaceKilz / unpacking.md
Created January 29, 2017 11:36
Unpacking files
# Untar and gunzip a .tar.gz file or .tgz or .z
tar xzvf

# Previewing file contents
tar tzvf filename

# Untar and bunxzip a .bzip2 file
tar xjvf filename
@BonfaceKilz
BonfaceKilz / useful_shortcuts.md
Created January 29, 2017 11:40
Really useful shortcuts for the terminal

Introduction

Here are a couple of useful shortcuts that are quite useful while working on the terminal

The shortcuts...

  1. Up/ Down Arrows: Move through your last used commands.
  2. Ctrl+left and Ctrl+Right: Jumps between arguments in your commands.
  3. Home and End or Ctrl+a or Ctrl+e: Move your cursor to the beginning and the end of the currently typed command, respectively.
  4. Ctrl+u: Clears the entire line so you can type in a completely new command.
  5. Ctrl+k: This deletes the line from the position of the cursor to the end of the cursor.
  6. Ctrl+w: Deletes the word before the cursor only.
@BonfaceKilz
BonfaceKilz / BookList.md
Last active February 2, 2017 08:32
This is the UP bookclub 2017 February - March book list

Introduction

Here's a couple of recommendations from you guys for the February - March UP Bookshelf.

The List

This list has been arranged randomly

  1. Flowers for Algernon by Daniel Keyes: Well this book is really short[There is a longer adaptation of this book]. It can be finished in one sitting. This book is a memoir of sorts of a mentally impaired man's journey's search for intelligence. Definitely an interesting one.
  2. Behind the Beautiful Forevers by Katherine Boo: This is as real with life one can get. Explore life in poverty with Katherine Boo. This book puts life into perspective.
  3. Crime and Punishment by Fyodor Dostoyevsky: Can be a difficult read, buy its very telling of the human condition.
  4. The Subtle Art of Not Giving A Fuck: A Counterintuitive Approach to Living a Good Life by Mark Manson: The title speaks for itself.
  5. The Tao of Coaching: Boost Your Effectiveness at Work by Inspiring and Developing Those Around You by Max Landsberg: A self-h
@BonfaceKilz
BonfaceKilz / video_manipulation.md
Last active March 14, 2017 08:07
Speeding up and boosting video using ffmpeg

To speed up you video from 1x to 5x, you can type:

ffmpeg -i <input_video> -vf "setpts=0.2*PTS" -an <output video>

To speed up both video and audio:

ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output.mkv

To increase volume output, use the -vol switch of FFmpeg like so:

@BonfaceKilz
BonfaceKilz / emacsclient.md
Created March 29, 2017 21:46
Setting up emacsclient

Add the following to your .bashrc file:

# Emacs config
export ALTERNATE_EDITOR=emacs EDITOR=emacsclient VISUAL=emacsclient
# Set an alias
alias ec="emacsclient"

Add the following to your ~/.config/systemd/user/emacs.service file:

[Unit]

Keybase proof

I hereby claim:

  • I am BonfaceKilz on github.
  • I am bonfacemunyoki (https://keybase.io/bonfacemunyoki) on keybase.
  • I have a public key whose fingerprint is D4F0 9EB1 1017 7E03 C28E 2FE1 F5BB AE1E 0392 253F

To claim this, I am signing this object:

@BonfaceKilz
BonfaceKilz / i3_reference.md
Last active April 17, 2017 21:39
i3 Cheatsheet

Basics

$mod + : Open new terminal
$mod + j : Focus Left
$mod + k : Focus down
$mod + l : Focus up
$mod + ; : Focus right
$mod + : toggle focus mode

Moving Windows

@BonfaceKilz
BonfaceKilz / curltest.c
Created June 4, 2017 20:06
A program that uses libcurl to fetch data in JSON format. Later parsed with json-c
/**
* A demo of how to get data from a website in JSON format
* I'll get data from this site:
* http://jsonplaceholder.typicode.com/posts
*
* Requirements:
*
* json-c - https://github.com/json-c/json-c
* libcurl - http://curl.haxx.se/libcurl/c
*