start new:
tmux
start new with session name:
tmux new -s myname
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#define FILEPATH "/tmp/mmapped.bin" | |
#define NUMINTS (1000) |
#!/usr/bin/env bash | |
cd $HOME | |
git clone git://git.linaro.org/qemu/qemu-linaro.git qemu-linaro | |
cd qemu-linaro | |
sudo apt-get build-dep qemu # to install the build dependencies of qemu | |
./configure --target-list=arm-softmmu --prefix=$HOME/qemu | |
make | |
make install | |
# Now you have a QEMU in $HOME/qemu/bin/qemu-system-arm and can test a BeagleBoard-xM build on qemu by running: |
As configured in my dotfiles.
start new:
tmux
start new with session name:
// Allows: | |
// funkyParser() | |
module.exports = function createFunkyParser(opt) { | |
return new FunkyParser(opt) | |
} | |
function FunkyParser(opt) { | |
// make params optional | |
opt = opt || {} |
#! /usr/bin/awk -f | |
# A script to extract the actual suppression info from the output of (for example) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all ./minimal | |
# The desired bits are between ^{ and ^} (including the braces themselves). | |
# The combined output should either be appended to /usr/lib/valgrind/default.supp, or placed in a .supp of its own | |
# If the latter, either tell valgrind about it each time with --suppressions=<filename>, or add that line to ~/.valgrindrc | |
# NB This script uses the |& operator, which I believe is gawk-specific. In case of failure, check that you're using gawk rather than some other awk | |
# The script looks for suppressions. When it finds one it stores it temporarily in an array, | |
# and also feeds it line by line to the external app 'md5sum' which generates a unique checksum for it. |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
#!/bin/bash | |
[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype | |
sudo git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp | |
sudo fc-cache -f -v |
Sometimes you need to mount a remote file system locally in order to share files, do some work or deploy a program remotelly. There are several protocols to do this like NFS, Samba, SSHFS and others. Here are some recipes.
Provided you have a user and password (or ssh keys loaded in the remote host) and an ssh server is running on the remote host, you can mount the remote filesystem through an SSH connection.
First, install sshd
:
# Simple Makefile to build a simple misc driver | |
# Nick Glynn <Nick.Glynn@feabhas.com> | |
# | |
obj-m += misc_example.o | |
KDIR := /lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
CC := $(CROSS_COMPILE)gcc |