SELECT
LOWER(
CONCAT(
# 1th and 2nd block are made of 6 random bytes
HEX(RANDOM_BYTES(4)),
'-',
HEX(RANDOM_BYTES(2)),
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols | |
# wayland-scanner is a tool which generates C headers and rigging for Wayland | |
# protocols, which are specified in XML. wlroots requires you to rig these up | |
# to your build system yourself and provide them in the include path. | |
xdg-shell-protocol.h: | |
wayland-scanner server-header \ | |
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ | |
xdg-shell-protocol.c: xdg-shell-protocol.h |
#!/usr/bin/env bash | |
# This script requires: | |
# - that the directory $HOME/.mpv exist | |
# - that the program socat be installed | |
# - that you start mpv with the unix socket feature pointing at that directory | |
# I recommend an alias in your .bashrc or equivalent file: | |
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket" | |
socket="$HOME/.mpv/socket" |
#!/usr/bin/env bash | |
# | |
# By Mike Hoffert. Based on build-kernel.sh in OS161. | |
# | |
# Alternative build script. Only errors are shown. Will automatically | |
# configure the script. | |
# | |
# Usage: | |
# ./build-kernel2 <kernel-name> [options] | |
# |
Howto build a rust compiler for the Raspberry Pi on Debian 7.1 (wheezy)
sudo apt-get install git build-essential
test `uname -m` = x86_64 && sudo apt-get install ia32-libs
git clone https://github.com/raspberrypi/tools.git
export PATH=$PWD/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
git clone http://github.com/mozilla/rust.git
cd rust
./configure --target-triples=arm-unknown-linux-gnueabihf
make
umd = (factory) -> | |
if typeof exports is 'object' | |
module.exports = factory() | |
else if typeof define is 'function' and define.amd | |
define([], factory) | |
else | |
@MODULE_NAME = factory() | |
umd |
Open $ vim /etc/default/grub
then add elevator=noop
next to GRUB_CMDLINE_LINUX_DEFAULT
. Run $ update-grub
and $ cat /sys/block/sda/queue/scheduler
to be sure that noop is being used:
$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler
[noop] deadline cfq
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'JSON' | |
require 'digest/sha2' | |
require 'pry' | |
require 'bigdecimal' | |
require 'bitcoin' # Because I need to cheat every now and then | |
# Usage: | |
# gem install pry json ffi ruby-bitcoin |
After installing Arch on my Raspberry Pi, internet worked out of the box: I could plug it into the router, turn it on, ssh in and start downloading things. But the router is in my housemate's bedroom, which isn't ideal. If I want the Pi to be connected to the internet in my room, I need it to be connected to my laptop. (Another option would be a USB wifi dongle, of course.) This is how I did it. Much credit goes to the Ubuntu wiki's Connection sharing page.
I should disclaim that I don't fully understand networking stuff, and some of what I say might be wrong. I also didn't write this as I was going; so while I've consulted my browser and shell histories, it's possible I've forgotten some steps.
My laptop is running Gentoo, and this is where most of the work has to be done. It connects to the internet through wifi, on interface wlan0
. The ethernet port is eth0
, and eth0
is also the name of the ethernet port on the Pi.
Step zero: plug ev
A long, long time ago... | |
I can still remember | |
How his blog used to make me smile. | |
And I knew that if he had his chance | |
That he could make their code enhance | |
And, maybe, they’d be happy for a while. | |
But August made me shiver | |
With every code line I’d deliver. | |
Bad news on the doorstep; |