This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
@authors = { | |
"david" => "David S. Miller", | |
"ingo" => "Ingo Molnar", | |
"takashi" => "Takashi Iwai", | |
"alexander" => "Al Viro", | |
"russel" => "Russell King", | |
"paul" => "Paul Mundt", | |
"tejun" => "Tejun Heo", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TRANS_H | |
#define TRANS_H | |
#include <ucontext.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
struct task | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
$fix = false | |
$verbose = false | |
$git_marks = {} | |
$r_marks = {} | |
$note_marks = {} | |
$mode = 'hg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
download_dir=/tmp/sb | |
sb_base_url=http://scratchbox.org/download/files/sbox-releases/apophis/tarball | |
sb=/opt/scratchbox | |
target=armv7 | |
sb_base_dir=$(dirname $sb) | |
mkdir -p $download_dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
v=$1 | |
o=$2 | |
d=$4 | |
loaders=('grub') | |
test -r /etc/default/installkernel && | |
source /etc/default/installkernel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def scanl(init) | |
self.reduce([init]) { |a, e| a.push(yield(a.last, e)) } | |
end | |
end | |
accum = [5, 10, 15].scanl(0) { |a, b| a + b }[1..-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* obj-m := fan.o | |
* KDIR := /lib/modules/$(shell uname -r)/build | |
* PWD := $(shell pwd) | |
* | |
* all: | |
* $(MAKE) -C $(KDIR) M=$(PWD) modules | |
* | |
* clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from mercurial import hg, ui, dagop, smartset | |
import sys, time | |
class Marks: | |
def __init__(self): | |
self.marks = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# actual code | |
find_merge () | |
{ | |
local selection extra | |
test "$2" && extra=" into $2" | |
git rev-list --min-parents=2 --grep="Merge branch '$1'$extra" --topo-order ${3:---all} | tail -1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$autogroups = Hash.new { |h,k| h[k] = [] } | |
Dir.glob('/proc/*').each do |e| | |
pid = File.basename(e).to_i | |
next if pid == 0 | |
begin | |
cmdline = File.read(e + '/cmdline').split("\0").join(" ") | |
next if cmdline.empty? |