Skip to content

Instantly share code, notes, and snippets.

organelle-m resize SD card

  • get a shell on the organelle-m, and become root

    sudo su -
    
  • check what filesystem is mounted at /sdcard (e.g. /dev/mmcblk0p3)

    df -h
    
@rupa
rupa / sshh_functions.sh
Created October 12, 2010 05:57
ssh/scp through NAT
# ssh/scp through NAT, as long as $outer has nc
# ssh v5.4+ should allow ssh -oProxyCommand="ssh -W $inner:%p" $outer $*
# hosts could also be defined in .ssh/config:
# Host foo
# hostname inner
# ProxyCommand ssh outer nc -w 1 %h %p
sshh() {
[ "$1" = "-h" ] && {
echo "sshh [opts] outer inner [cmd]"
return
@rupa
rupa / hack.sh
Created April 7, 2012 01:46 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@rupa
rupa / redemption song
Created September 9, 2017 03:06
I will fucking sue you so hard if you steal this original work
new immigrants they rob me
oh my they took our jobs
many years after my grandad
lost all of his slaves
but my vote still sort of works
by the grace of mother russia
we won so fuck you haha
trump is me
wont you help to sing
from long.ass.path.that.is.really.quite.long \
import VerboseClassName
from long.ass.path.that.is.really.quite.long import (
VerboseClassName)
In [1]: x = 'a\rb\rc'
In [2]: x.split()
Out[2]: ['a', 'b', 'c']
In [3]: x.split()
Out[3]: ['a', 'b', 'c']
In [4]: x = 'a\r\nb\r\nc'
function! SuperTab()
if (strpart(getline('.'),col('.')-2,1)=~'^\W\?$')
return "\<Tab>"
else
return "\<C-n>"
endif
endfunction
function! SuperShiftTab()
if (strpart(getline('.'),col('.')-2,1)=~'^\W\?$')
return "\<S-Tab>"
#!/bin/bash
# rly dum markov
# db file
db=~/.smirnoff.db
# min length of chain to learn
min=3
function help {
echo "$(basename $0) [ -init | -cram | -help ]"
@rupa
rupa / capslockenforcementbot
Created October 22, 2010 21:27
capslock enforcement bot
#!/usr/bin/perl
use POSIX;
use IO::Socket;
use utf8;
use Encode;
#fork && exit;
setsid;
@rupa
rupa / hhgttg.summarized.txt
Created June 16, 2010 23:02
Douglas Adams v. Open Text Summarizer
Hitchhiker's Guide To The Galaxy 1-5
summarized with Open Text Summarizer at ratio of 1%
http://libots.sourceforge.net/
-------------------------------------------------------------------------------
I
Mr Prosser's mouth opened and closed a couple of times while his mind was for a