Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -e
usage() {
local p=$(basename $0)
cat <<EOF >&2
$p - Run QEMU/KVM
Usage: $p <rootfs-or-image> <qemu-options...> -- <boot-options...>
Example:
# $p /n/sid64
#!/bin/sh
set -e
usage() {
local p=$(basename $0)
cat <<EOF >&2
$p - Simple wrapper to run QEMU/KVM in various configurations
Usage: $p <rootfs-or-image> <qemu-options...> -- <boot-options...>
Example:
# $p /n/sid64
@tai
tai / 20180722-python-fft-01.ipynb
Created July 22, 2018 14:08
2018/20180722-python-fft/20180722-python-fft-00-Copy1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*BINFMTC: -Wall
*/
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <strings.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
/*BINFMTC: -Wall
*/
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
@tai
tai / main.c
Created September 30, 2018 07:04
//
// blink test for PIC18K14K50
//
#define _XTAL_FREQ 16000000 /* depends on FOSC and OSCCON */
#include <xc.h>
// configure clock
#pragma config CPUDIV=NOCLKDIV, USBDIV=OFF
#pragma config FOSC=IRC, PLLEN=OFF
#!/usr/bin/env python3
import sys
import os
from argparse import ArgumentParser
from google.cloud import translate
def format_usage():
p = os.path.basename(sys.argv[0])
#!/bin/bash
usage() {
local p=$(basename $0)
cat <<EOF >&2
$p - List changed file that may be in other version tree
Usage: $p <tag>
Example:
// current state is based on v2.6.32
$ git log -1 --oneline
#!/bin/bash
usage() {
local p=$(basename $0)
cat <<EOF >&2
$p - List extra files that appeared between versions
Usage: $p <since-ver> <other-ver>
Example:
// current state is based on v2.6.32
$ git log -1 --oneline
#!/bin/sh
usage() {
local p=$(basename $0)
cat <<EOF >&2
$p - List extra files that already exists in given version
Usage: $p <version-spec> <files...>
Example:
// Current is v2.6.32 + patch - reverts
$ git log -2 --oneline