Skip to content

Instantly share code, notes, and snippets.

wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains domain.com \
--no-parent \
domain.com
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh

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

@jadedgnome
jadedgnome / createAccount.sh
Created April 4, 2015 13:32
shell script to create a user account on linux
#!/bin/bash
clear
trap "" SIGHUP SIGINT SIGTERM SIGTSTP
#get username, check if its taken, and if its proper length
while true
do
echo -n "Create username: "
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@jadedgnome
jadedgnome / download.sh
Last active August 29, 2015 14:19 — forked from mildred/download.sh
#!/bin/bash
url=http://redefininggod.com
webarchive=https://web.archive.org
wget="wget -e robots=off -nv"
tab="$(printf '\t')"
additional_url=url.list
# Construct listing.txt from url.list
# The list of archived pages, including some wildcard url
@jadedgnome
jadedgnome / install-megatools.txt
Last active September 14, 2017 09:32
Install megatools on Debian 7 64bit & required dependencies
sudo apt-get update && sudo apt-get install libglib2.0-dev libtool autoconf glib-networking fuse curl wget gettext gobject-introspection libcurl4-openssl-dev -y
sudo apt-get install lib32gmp-dev lib32gmp10 lib32gmpxx4 libgmp-dev libgmp10 libgmp3-dev -y
wget https://ftp.gnu.org/gnu/nettle/nettle-3.0.tar.gz && tar xvf nettle-3.0.tar.gz && cd nettle-3.0/ && ./configure && make && sudo make install && cd ../
wget http://megatools.megous.com/builds/megatools-1.9.93.tar.gz && tar xvf megatools-1.9.93.tar.gz && cd megatools-1.9.93/ && ./configure && make && sudo make install
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes: