Posts

Showing posts with the label hack

Funny BASH snippets

echo howdy /bin/echo howdy /bin/../bin/echo howdy /bin/echo* howdy cd /bin echo* howdy *echo howdy ec*ho howdy ech? howdy ??h? howdy ech[o] howdy cd /tmp ec${howdy}ho howdy echo$howdy howdy ec''ho howdy ec""ho howdy 'ec'ho howdy "ec"ho howdy 'echo' howdy "echo" howdy ech\o howdy ec``ho howdy ec$()ho howdy ec`true`ho howdy ec$(true)ho howdy $yay echo howdy `` echo howdy `true` echo howdy `echo echo` howdy :&echo howdy if echo howdy;then :;else echo howdy;fi ! echo howdy { echo howdy ;} (echo howdy) eval echo howdy xargs echo howdy < /dev/null sh -c 'echo howdy' bash -c 'echo howdy' ssh localhost 'echo howdy' cd /tmp printf "all:\n\techo howdy" > Makefile make cd /tmp echo echo howdy > bash chmod +x bash ./bash cd /tmp cp /bin/bash bash echo echo howdy > bash ./bash . ./bash bash bash PATH=. bash alias howdy='echo howdy...

841N serial unbricking with... needles?!

Image
There, I fixed it for you: WARNING: this is a pro-only approach, as potentially bad contacts could introduce typing errors which could spoil your write address and brick the boot loader beyond recovery without you even noticing! So after I got the ill router, I bought a new 3.3V CA-42 cable for about $3 at a local store. I didn't have my soldering kit nearby and anyway didn't want to mess up this beauty, so I first started experimenting. What could I lose besides a non-functional router? I have dozens of fully functional ones to spare. Actually, after all this messing around with firmwares, this is the only one of my routers which is bricked, and it wasn't even my fault. Anyway, I first tested the vendor specific wiring of the cable. Blue is ground, white is RX and yellow is TX on mine. I've then proceeded with readout-only tests. Actually, touching the bare wires themselves almost worked. I could get an almost complete log this way. Although, to get the whole t...

Read a file by inode - the hard way

I found a nice hack to undelete an open file: Undeleting an open file by inode Though, I generally use cat , as that's much easier. It's also useful to view cached content of plugins which delete their files upon download.

Cross compiling Qt to 64-bit

The following didn't work by itself: How can I build 64 bit Qt on a 32 bit system ? The solution was to simple set the write-protect flag on the exe files under qt/bin (on moc, jom, etc.).

Program Erlang/OTP without the syntax quirks

I think I can say that you can be pretty comfortable with Erlang after a while, but you never forget how clear and conscious Haskell (or Scala, etc.) code is compared to that. If only you needed to type less punctuation and if it had static types... Anyway you can both have your pie and eat it according to some projects: Targeting a Haskell compiler for the Erlang BEAM The following were newbie hacking attempts at transforming Haskell syntax to Erlang syntax at the source level: The Haskerl index of some related mails [erlang-questions] Any recent progress on Haskerl? (the project page blog.tornkvist.org seems to be unavailable at the moment)