Skip to content

Instantly share code, notes, and snippets.

View roddehugo's full-sized avatar

Hugo Rodde roddehugo

View GitHub Profile
@roddehugo
roddehugo / netrw.txt
Created August 13, 2021 07:38 — forked from danidiaz/netrw.txt
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
Version 2009-08-22
===========================
FREE USB-IDs FOR SHARED USE
===========================
Objective Development has reserved a set of USB Product-IDs for use according
to the guidelines outlined below. For more information about the concept of
USB IDs please see the file USB-ID-FAQ.txt. Objective Development guarantees
that the IDs listed below are not used by any USB compliant devices.
@roddehugo
roddehugo / cc_args.py
Last active May 19, 2020 05:28
Make CC drop-in replacement imported from https://github.com/xavierd/clang_complete
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
CONFIG_NAME = ".clang_complete"
def readConfiguration():
try:
f = open(CONFIG_NAME, "r")
@roddehugo
roddehugo / GIF-Screencast-OSX.md
Created April 28, 2020 13:46 — forked from baumandm/GIF-Screencast-OSX.md
OS X Screencast to Animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.

Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@roddehugo
roddehugo / yocto-embedded-linux.md
Last active April 15, 2020 13:10
Creating Embedded Linux distros with the Yocto Project

Creating Embedded Linux distros with the Yocto Project

  1. Introduction

This guide is developed and tested using Ubuntu 16.04 as a host computer.

  1. Installing Dependencies
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath libsdl1.2-dev xterm
@roddehugo
roddehugo / qemu-raspbian-rpi1.md
Last active April 15, 2020 12:41
Emulate Raspbian (Buster) with QEMU on macOS

Emulate Raspbian (Buster) with QEMU on macOS

Steps

  1. Install qemu:
    brew install qemu
  2. Download qemu-rpi-kernel:
@roddehugo
roddehugo / ubuntu-xenial-armfh-qemu.md
Created April 15, 2020 12:38 — forked from takeshixx/ubuntu-xenial-armfh-qemu.md
Running Ubuntu 16.04.1 armhf on Qemu

Running Ubuntu 16.04.1 armhf on Qemu

This is a writeup about how to install Ubuntu 16.04.1 Xenial Xerus for the 32-bit hard-float ARMv7 (armhf) architecture on a Qemu VM via Ubuntu netboot.

The setup will create a Ubuntu VM with LPAE extensions (generic-lpae) enabled. However, this writeup should also work for non-LPAE (generic) kernels.

The performance of the resulting VM is quite good, and it allows VMs with >1G ram (compared to 256M on versatilepb and 1G on versatile-a9/versatile-a15). It also supports virtio disks whereas versatile-a9/versatile-a15 only support SD cards via the -sd argument.

Get netboot files

@roddehugo
roddehugo / .bash_profile
Last active August 29, 2015 14:21
[Bash] Working environment
# Load the shell dotfiles, and then some:
if [ -f $(brew --prefix bash-completion)/etc/bash_completion ]; then
source $(brew --prefix bash-completion)/etc/bash_completion
fi
for file in ~/.bash.d/{path,prompt,exports,aliases,functions,utils,autocomplete}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
@roddehugo
roddehugo / mark-complete.sh
Last active August 29, 2015 14:21
[Bash] Homemade shortcuts to favorite directories
# Add completion for marks shortcuts
_completemarks() {
local curw=${COMP_WORDS[COMP_CWORD]}
local wordlist=$(find $MARKPATH -type l | awk -F"/" '{printf "%s ",$NF}')
COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw"))
return 0
}
complete -F _completemarks jump unmark