Skip to content

Instantly share code, notes, and snippets.

@sergeykish
sergeykish / rewrite
Created December 15, 2010 10:01
Send mail with Plan9's upas/fs
#
# Just push to upas/smtp
#
([^@]+)@([^@]+) | "upas/smtp -as -h gmail.com tcp!smtp.gmail.com sergey.kish $* "'\1@\2'"
@sergeykish
sergeykish / gist:734763
Created December 9, 2010 14:32
plan9's ghostscript
term% pwd
/sys/src/cmd/gs/lib
term% gs /sys/doc/auth.ps
AFPL Ghostscript 8.53 (2005-10-20)
Copyright (C) 2005 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file s050000l.pfb.
Can't find (or can't open) font file /sys/lib/Resource/Font/StandardSymL.
Can't find (or can't open) font file StandardSymL.
Can't find (or can't open) font file /sys/lib/Resource/Font/StandardSymL.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Freelance Programmers | Freelance Designers | Freelancer Design Work
</title>
<meta name="description" content="Freelance programmers and web designers bid on jobs. Outsourced jobs" />
<!-- <meta name="keywords" content="freelance programmer, custom web design, outsource projects, outsource to india, outsourcing india, freelancing, freelancers, programmers, web designers, freelance work, outsource work, contract jobs, freelance programming, contract programming, contract work, php, asp, website design, SEO, search engine optimization, web promotion, javascript, webmaster, webmasters, cgi, perl, java, python, xml, flash, visual basic, banner design, system admin, logo design, website security, offshore web development, buy, purchase, web, services, company, web services, companies"> -->
<meta http-equiv="Content-Type" content="t
@sergeykish
sergeykish / after.url
Created November 22, 2010 09:07
Cleanup firefox's opensearch params
http://www.google.com/search?q=firefox
$ iostat
Linux 2.6.35-ARCH (myhost) 11/20/2010 _i686_ (2 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
6.45 0.00 7.56 0.30 0.00 85.69
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 43.18 37.25 350.00 408252 3835952
@sergeykish
sergeykish / gist:667945
Created November 8, 2010 17:04
Disk geometry in Plan9 and Linux
% cat /dev/sdC0/ctl
inquiry QEMU HARDDISK
config 0040 capabilities 0B00 dma 00550020 dmactl 00550020 rwm 16 rwmctl 16 lba48always off
geometry 125045424 512 16386 16 83
part data 0 125045424
part plan9 1024 4196352
part linux 4196352 25168896
part linux1 25168896 125044736
part 9fat 1024 205824
part nvram 205824 205825
@sergeykish
sergeykish / gist:667847
Created November 8, 2010 16:02
Plan9 boot
Booting 'Plan 9'
rootnoverify (hd0,0)
makeactive
chainloader +1
PBS1...
Plan 9 from Bell Labs
ELCR: 0CB8
clockinit...alarminit...meminit...spllo...pcimatch...pcirouting: South birdge 80
@sergeykish
sergeykish / .xinitrc
Created October 28, 2010 07:29
custom keymaps /usr/share/X11/xkb
setxkbmap us,ru dvorak-de,winkeys-ua
@sergeykish
sergeykish / gist:640243
Created October 22, 2010 09:40
Compile with omitted parameters with different compilers
$ cat parameter-name-omitted.c
#include <stdio.h>
void
main(int, char* []) {
printf("Hello, world!\n");
}
$ gcc parameter-name-omitted.c
parameter-name-omitted.c: In function ‘main’:
@sergeykish
sergeykish / gist:615287
Created October 7, 2010 15:34
git branches are just files with hash inside
~/loxicon/repo$ cd .git/refs/heads/
~/loxicon/repo/.git/refs/heads$ for file in `find . -type f`; do echo $file `cat $file`; done
./pagination d6aeafeeb6c290cc409245d475d00477e3937d14
./i18n f060c8a4ef79ccf7978a7c125e474bbe6c9322cb
./jstest 24fff8931105f5e3cb3383820e10c5d40750d9ee
./fix 341b36c05e00d1b1fbe694112cf1c984e66b3c6f
./master 75eade54aa1e782129ecdc12efd9affe10a0ea01
./bundler f9f42db2d85b4bfa3467ee3b933e33f869a08898
./rc de3d5a51635fc903e00b84d2f029f1efcfa31cbb
./bookmark 1b635f3221a226bdfd910dfd88e3592d30245dfe