This file contains hidden or 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
const struct dicePins { int centre,leftDiag,rightDiag,middle; } \ | |
l = { 9,8,7,6 }, | |
r = { 13,12,11,10 }; | |
const int buttonPin = 2; | |
int buttonState; | |
void setDicePins(const struct dicePins d) { | |
pinMode(d.centre, OUTPUT); |
This file contains hidden or 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
U-Boot 2010.09 (Oct 23 2010 - 11:49:22) | |
Marvell-Dockstar/Pogoplug by Jeff Doozan | |
Marvell>> printenv | |
ethact=egiga0 | |
bootdelay=3 | |
baudrate=115200 | |
mainlineLinux=yes | |
console=ttyS0,115200 | |
led_init=green blinking | |
led_exit=green off |
This file contains hidden or 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
# | |
# Custom kernel for Seagate DockStar (Marvell SheevaPlug based) devices. | |
# | |
# $FreeBSD: releng/10.2/sys/arm/conf/DOCKSTAR 283404 2015-05-24 15:21:47Z ian $ | |
# | |
# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html | |
# | |
# The handbook is also available locally in /usr/share/doc/handbook | |
# if you've installed the doc distribution, otherwise always see the | |
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the |
This file contains hidden or 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
export BUILDDIR="${BUILDDIR:-$(pwd)}" | |
export SRCDIR="${SRCDIR:-/usr/src}" | |
export MAKEOBJDIRPREFIX="${MAKEOBJDIRPREFIX:-${BUILDDIR}/obj}" | |
export DESTDIR="${DESTDIR:-${BUILDDIR}/dest}" | |
export KERNCONF="${KERNCONF:-MT7620}" | |
export ARCH="${ARCH:-mips}" | |
export TARGET_ARCH="${TARGET_ARCH:-mipsel}" | |
export MAKEFLAGS="${MAKEFLAGS:-}" | |
# make kernel-toolchain |
This file contains hidden or 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
export CC="${CC:-}" | |
export BUILDDIR="${BUILDDIR:-$(pwd)}" | |
export SRCDIR="${SRCDIR:-${BUILDDIR}/src}" | |
export MAKEOBJDIRPREFIX="${MAKEOBJDIRPREFIX:-${BUILDDIR}/obj-amd64}" | |
export DESTDIR="${DESTDIR:-${BUILDDIR}/dest-amd64}" | |
export KERNCONF="${KERNCONF:-GENERIC}" | |
export TARGET_ARCH="${TARGET_ARCH:-amd64}" | |
set -e |
This file contains hidden or 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
# pw usermod -n root -s /bin/sh | |
# export ENV=${HOME}/.shrc | |
export EDITOR=vi | |
set -o emacs | |
alias ls="ls -F" | |
PS1="[${USER}@\H] \w \$ " |
This file contains hidden or 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 | |
set -e | |
JAIL_IF=${JAIL_IF:-lo1} | |
JAIL_IP=172.16.0 | |
JAIL_MAX=16 | |
clean() { | |
set +e |
This file contains hidden or 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
import itertools | |
def triangle(base): | |
stack = [base] | |
while len(stack[-1])>1: | |
stack.append([abs(i-j) for i,j in zip(stack[-1],stack[-1][1:])]) | |
return stack | |
def check(triangle): | |
return len(set(itertools.chain(*triangle))) == sum(range(len(triangle)+1)) |
This file contains hidden or 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
BEGIN { | |
n = split("January:February:March:April:May:June:July:August:September:October:November:December",months,":") | |
for (i=0;i<n;++i) { | |
rmonth[months[i+1]] = i+1 | |
} | |
FS = " |/" | |
} | |
# Directory in format "[Event], yyyy month dd" or "yyyy month dd" |
This file contains hidden or 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
# $OpenBSD: Makefile,v 1.3 2009/02/08 22:53:01 mbalmer dead $ | |
PROG= wake | |
SRCS= wake.c | |
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes | |
CFLAGS+= -Wmissing-declarations -Wshadow -Wpointer-arith | |
CFLAGS+= -Wcast-qual -Wsign-compare -Wbounded | |
MAN= wake.8 |