As configured in my dotfiles.
start new:
tmux
start new with session name:
<?xml version="1.0" encoding="UTF-8"?> | |
<yahoo-weather-codes> | |
<code number="0" description="tornado"/> | |
<code number="1" description="tropical storm"/> | |
<code number="2" description="hurricane"/> | |
<code number="3" description="severe thunderstorms"/> | |
<code number="4" description="thunderstorms"/> | |
<code number="5" description="mixed rain and snow"/> | |
<code number="6" description="mixed rain and sleet"/> | |
<code number="7" description="mixed snow and sleet"/> |
#!/usr/bin/env python | |
# muflax <[email protected]>, GPL 3.0 | |
""" | |
Reads in .txt files and formats them for cloze deletion, with 2 lines of context | |
before and after. It regards every line as one item. | |
""" | |
import re, sys |
As configured in my dotfiles.
start new:
tmux
start new with session name:
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
# comments example for .dat or .ledger files | |
@smallexample | |
; This is a single line comment, | |
# and this, | |
% and this, | |
| and this, | |
* and this. | |
# If you have a deeply nested tree of accounts, | |
# it may be convenient to define an alias, for example: |
%module(threads="1") something | |
%{ | |
// Register a callback (called from Python code) | |
// callbackFunc is a Python callable accepting one argument | |
void registerHandler(PyObject *callbackFunc) | |
{ | |
SWIG_PYTHON_THREAD_BEGIN_ALLOW; | |
const bool hasCallback = |
SSH to rasp Pi: | |
ssh [email protected] | |
password: raspberry | |
Given that the lego Tower is in /dev/usb/legousbtower0, start by making sure the device is accessible with a lazy hack: | |
$ sudo chmod 777 /dev/usb/legousbtower0 | |
Here are two useful nqc commands to communicate with the RCX brick through the Lego Tower. | |
1) Uploading the firmware(if needed): nqc -Susb:/dev/usb/legousbtower0 -firmware firm0309.lgo |
#Sample code | |
#Hello world | |
"Hello world!" print | |
#Factorial | |
factorial := method(n, if(n == 1, 1, n * factorial(n - 1))) | |
99 bottles of beer |