front | idx | new | login |
 

Qemu Linux Curses Guest

Framebuffer needs to be disabled with -curses, or you'll just get something like "1024x768 Graphics Mode".

Disable framebuffer module loading in Linux:

  • echo 'blacklist vga16fb' >> /etc/modprobe.d/blacklist-fdev.conf
Disable framebuffer in grub:
  • edit /etc/default/grub
  • update GRUB_CMDLINE_LINUX_DEFAULT="fbcon=map:99 text"
  • uncomment GRUB_TERMINAL=console
  • sudo update-grub
#public #note
 

sshfs fuse mount

Setup

sudo apt-get install sshfs
sudo usermod -aG fuse $(whoami) # if necessary

Mount

sshfs user@the.server.tld:dir mountpoint

Unmount

fusermount -u mountpoint

#public #note

 

Proprietary JDK on Debian

In case you must use the proprietary Oracle JDK:

  • grab the JDK
  • sudo apt-get install java-package
  • make-jpkg downloadedpackage.tar.gz
    • may need to install some additional dependencies before this succeeds
  • install the package. e.g: sudo dpkg -i oracle-java8-jdk_8u92_amd64.deb
  • run update-alternatives for java if necessary
#public #note
 

Resurrecting a T450 back to life

This probably holds also for other Lenovo Thinkpads.

Issue

Machine won't boot. Nothing seems to bring it back to life. Brick state.

Common fix

There is a small hole on the backside of the laptop. In T450 it's roughly at the other side of the touchpad. There is no text or symbol next to the hole.

You need to press the magic button in the hole.

This apparently resets something related to battery state.

Notes

You need have a correct combination of:

  • having or not having the battery
  • having or not having the charger connected
  • pressing the magic button before or after power button
This has worked at least three times for me so far.

#public

 

Reseptit

Valurautapannupizza

Pohja: 2.5dl vehnäjauhoja, 0.3dl öljyä, 0.5tl suolaa, 11g kuivahiivaa, 1.4dl vettä

Tomaattikastike: tomaattimurskaa, pyrettä, vähän hunajaa ja maun mukaan mausteita

Vaiheet:

  • Lämmitä pannu vähän yli 200C (hella 4)
  • Öljyä ja nokare voita
  • Taikina pannulle ja levittele
  • Muotoile tarkemmin tomaattikastiketta levittäessä
  • Raasta päälle juusto ja lisää täytteet
  • Laske lämpö max 200 (hella 3)
  • Anna kypsyä kannen alla 15min

Linssikastike

Hummus

http://cooking.nytimes.com/recipes/1014943-hummus-from-jerusalem


#public

 

Calendar test

19.3.2016, Saturday, week 12

  • Another todo
  • Reminder to do something
  • it's a day
20.3.2016, Sunday, week 12
  • it's a day
21.3.2016, Monday, week 13
  • It's an odd Monday
  • it's a day
  • it's also monday
22.3.2016, Tuesday, week 13
  • it's a day
23.3.2016, Wednesday, week 13
  • it's a day
24.3.2016, Thursday, week 13
  • it's a day
25.3.2016, Friday, week 13
  • it's a day
26.3.2016, Saturday, week 13
  • it's a day
every day: it's a day every Monday: it's also monday every Monday in odd weeks: It's an odd Monday
Page content processed by kal
#type:kal #public #testing
 

Omega

Eventually everyone hated the theory of everything.

Obviously they loved it at first. All forces of the nature, including one hitherto unknown extremely weak one, finally unified in one grand theory. It was beautiful, fitting in just nine dimensions and describing an infinite set of exponentially rare elementary particles using just five basic constructs.

It was orthogonal. It was elegant. It was consistent. It had omega.

Omega was a large constant. Everyone thought it was something temporary. Surely such a cute theory couldn't come with an ugly 1642-bit constant. It was an artefact of the unorthodox strategy used to obtain the initial version of The Theory, surely! Once someone smart enough came along, poof, it would split into a few vibrations in higher order tensor spaces, or an extra axiom or two at most.

No such luck.

In fact, all research just managed to contribute to the amazing dullness of Omega. There was just nothing remarkable about it, other than the utter unremarkability of it. It wasn't even really random. It was a disgrace!

Analysis of The Theory, as the field of studying the theory modulo Omega was generally known, to distance it from the Omegists, did eventually produce a useful result. Everyone knew that the theory described all kinds of universes, and the constant was used in a way to drive the computation. It turned out, that one could compute which bits of Omega actually did have any effect on a particular solution of the theory, such as our universe.

This renewed the interest in reduction of Omega. Several thesis were written on strategies to construct Omega Primes, which would avoid the redundant bits. That is, until someone took a closer look at the bits that weren't needed.

One in eight bits was zero.

The remaining ones weren't especially random.

The first one to print out the ASCII characters did get a humorous last Nobel on physics, though.

"CONGRATULATIONS ON SOLVING THE THEORY OF EVERYTHING. WE RECOMMEND YOU PASS THIS THEORY TO THE NEXT UNIVERSE UNCHANGED, UNLESS YOU CRACKED THIS BEFORE MIDPOINT OF YOUR UNIVERSE. HAVE A NICE EXISTENCE!"#fiction #blag #public

 

Owl Lisp

(manual to be added here)

Todo

regex

  • quoted chars in replace pattern
  • proper end treatment
#public
 

Misc notes

tmpfs ramfs mount

  • sudo mount -t tmpfs -o size=128m tmpfs $HOME/ram
  • fstab: tmpfs /XXX/ram tmpfs rw,size=1G,uid=XXX,mode=YYY 0 0
owl random test
  • ./rand 0 | dieharder -a -g 200 2>&1 | tee /tmp/dieharder-owlrandom-0, seed 0,1,2,3
virtualbox host ip:
  • 10.0.2.2
year start days:
  • for foo in $(seq 1 3000); do echo "$foo $(date --date $foo-1-1 +%A)"; done
gnu screen splitting:
  • C-a S, split horizontally
  • C-a X, close current
  • C-a Q, close all but current
  • C-a |, split vertically
  • C-a tab, switch split screen
brightness:
  • /sys/class/backlight/*/max_brightness and brightness
  • Asus R11CX: sudo setpci -s "00:02.0" F4.B=XX (XX = 0-ff)
send files with speed cap:
  • tar -f - -c dir | xz | pv -L 64k | ssh me@server.tla "xz -d | tar -xf -"
xkb key remap:
  • check keycode with xev
  • xmodmap -e "keycode <thecode> = <desiredkey>"
xkb layout:
  • setxkbmap -layout fi
basic heirloom mailx cmdline:
  • command | mailx -S "from=$(whoami) <$(whoami)@$(hostname --long)>" -S smtp=mail.panoulu.net -s <subj> <addr>
tcp/udp listeners: netstat -plunt

ssh socks proxy:

  • ssh -D 8080 user@host.tla
  • google-chrome --proxy-server="socks5://localhost:8080"
raspbian boot overclock skip: hold shift at boot

debian locally administered mac: /etc/network/interfaces, iface eth0 inet dhcp,pre-up ip link set eth0 address <themac>

manual LUKS encrypted partition use:

  • apt-get install cryptsetup, cryptsetup luksFormat /dev/sdb1, cryptsetup luksOpen /dev/sdb1 foo, mke2fs -t ext4 /dev/mapper/foo, mount /dev/mapper/foo /mnt
  • unmount: umount /mnt, cryptsetup luksClose foo
  • mount: cryptsetup luksOpen /dev/sdb1 foo, mount /dev/mapper/foo /mnt
animated gif:
  • ffmpeg -i VIDEO -ss STARTPOS -s cga -t DURATION -r FPS -f image2 image-%5d.gif
  • convert -delay DELAY image-00* -loop 0 animated.gif
raspi core temperature: alias temperature='expr $(cat /sys/class/thermal/thermal_zone0/temp) "/" 1000'

png2webm:

  • mencoder mf://*.png -mf w=100:h=100:fps=25:type=png -ovc lavc -lavfopts format=webm -lavcopts vcodec=libvpx -ac none -o all-png.webm
mencoder grab audio: mencoder "$VIDEO" -of rawaudio -oac mp3lame -ovc copy -o "$VIDEO.mp3"

QEMU 2.x

  • change to monitor in curses mode: Esc-2
  • change ttys: go to monitor, sendkey ctrl-alt-fX
  • ungrab mouse: Ctrl-Alt-g
Ubuntu boot politely to console in Qemu/curses:
  • /etc/modprobe.d/blacklist-framebuffer.conf -> blacklist vga16fb
  • /etc/default/grub -> GRUBCMDLINELINUX_DEFAULT="fbcon=map:99 text"
  • sudo update-grub
reduce page flushing interval: /proc/sys/vm/dirty_expire_centisecs 1000

Firefox don't toggle menubar with alt:

  • about:config -> ui.key.menuAccessKeyFocuses -> false
git tag:
  • git tag v0.4, git push origin master v0.4
  • git tag -d v0.4, git push origin :refs/tags/v0.4
fix screens: xrandr --auto + window manager restart

swap mouse buttons: xmodmap -e 'pointer = 3 2 1'

Quick record: ssh -C host "for foo in \$(seq 100 150); do DISPLAY=:0 xwd -root > frame-\$foo.xwd; sleep 0.9; done; convert -resize 30% -delay 90 frame-* anim.gif; rm frame-*; cat anim.gif | gzip -9" | gzip -d > host.gif

basic git setup:

  • remote: mkdir /foo/loltron.git && cd /foo/loltron.git && git --bare init && echo ok
  • local: mkdir loltron && cd loltron && git init, git add readme.txt && git commit -m foo, git remote add origin ssh://me@remote.server.tla/foo/loltron.git, git push origin master, git checkout origin/master, git branch -f master origin/master, git checkout master
linux reboot on kernel panic:
  • echo kernel.panic=30 >> /etc/sysctl.conf
Debian locale init: locale-gen en_US, fi_FI.UTF-8 en_US.UTF-8 + dpkg-reconfigure locales

ClojureScript: see object structure in logs by using js logging directly (duh!) (.log js/console <object>)

ClojureScript: avoid inliner attack in advanced compilation:

  • sans externs (aget js/window "navigator" "propertyName")
  • extenrs, project.clj -> :compiler -> :externs ["externs/marked.js"], window.marked = function(){}; @ marked.js
debian keyboard layout
  • dpkg-reconfigure keyboard-layout
  • service keyboard-setup restart
allow X to be run by everyone:
  • /etc/X11/Xwrapper.config: allowed_users=anybody
letsencrypt stunnel:
  • git clone https://github.com/letsencrypt/letsencrypt
  • letsencrypt-auto certonly --standalone -d foobar.com -d www.foobar.com
  • stunnel.conf
    • cert = /etc/letsencrypt/live/foobar.com/fullchain.pem
    • key = /etc/letsencrypt/live/foobar.com/privkey.pem
    • [https], accept = 443, connect = 80, renegotiation = no
#note #public
 

So what's this then?

This site is an ongoing project to implement a kind of content management / programming language hybrid I planned nearly a decade ago. Better late than never.

The site is currently being served by a tiny ARM computer from somewhere in Germany, running the experimental builtin web server of Owl Lisp.

Content and quality of user experience will vary during development.#blag #meta #public

@aohelin | aoh@github