I am using 0.94 (http://builds.factorcode.org/release?os=linux&cpu=x86.64 )
To change listener's font size:
( scratchpad ) USING: pango.cairo
( scratchpad ) 120 dpi set-global
( scratchpad ) save
( scratchpad )
Wrost
((How are you doing?
Friday, December 9, 2011
Juniper VPN on Archlinux 64 bit.
mainly, follow this:
http://www.rz.uni-karlsruhe.de/~iwr91/juniper/
http://www.rz.uni-karlsruhe.de/~iwr91/juniper/
~/.juniper_networks/network_connect/config/foo.conf
host=vpn.your.host.com
user=your.user.name
realm=view source on the vpn welcome page and search for realm
cafile=/etc/ssl/certs/ca.pem
certfile=
Then, you can do
$ sudo vim /etc/pacman.conf
And, uncomment
[multilib]
Include = /etc/pacman.d/mirrorlist
$ sudo pacman -Sy lib32-glibc lib32-zlib lib32-nss lib32-gcc-libs net-tools
$ jnc --nox foo
$ sudo vim /etc/resolve.conf
And change nameserver order.
Thursday, December 1, 2011
archbang testing
I bought a laptop because desktop's harddisk broke.
It turned out I had a working harddisk. Archbang is installed on the desktop.
The desktop PC is a6114x .
The default font, Deja Vu Mono did not display underscore character. Seems like that font isn't good. pacman -S ttf-inconsolata
$ grep font ~/.Xdefaults
URxvt*font: xft:Inconsolata-16
$ grep font ~/.gvimrc
set guifont=Inconsolata\ Medium\ 16
I have usb interface (old maudio fast track). .asoundrc
pcm.dmixed {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
}
}
pcm.!default {
type plug
slave.pcm "dmixed"
}
ctl.!default {
type hw
card 1
}
where card 1 is Track [Fast Track], device 0: USB Audio [USB Audio]
Also, to set audio card ordering:
/etc/modprobe.d/alsa.conf:
options snd slots=snd-hda-intel,snd-usb-audio
# http://alsa.opensrc.org/MultipleCards#The_newer_.22slots.3D.22_method
My graphics card that is part of motherboard is
00:0d.0 VGA compatible controller: nVidia Corporation C61 [GeForce 6150SE nForce 430] (rev a2)
$ cat /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
Identifier "Monitor0"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia" #Choose the driver used for this monitor
EndSection
Section "Screen"
Identifier "Screen0" #Collapse Monitor and Device section to Screen section
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24 #Choose the depth (16||24)
SubSection "Display"
Depth 24
Modes "1280x1024_75.00" "1024x768_75.00" #Choose the resolution
EndSubSection
EndSection
I like to swap ctrl and caps lock.
$ grep ctrl ~/.config/openbox/autostart
setxkbmap -option ctrl:swapcaps
I like W-w to show all applications, W-q to shutdown.
~/.config/openbox/rc.xml
oblogout
I tried to set up juniper vpn but failed. Went all the way to installing 32bit java.. But not worth it.
I need to install VirtualBox.
It turned out I had a working harddisk. Archbang is installed on the desktop.
The desktop PC is a6114x .
The default font, Deja Vu Mono did not display underscore character. Seems like that font isn't good. pacman -S ttf-inconsolata
$ grep font ~/.Xdefaults
URxvt*font: xft:Inconsolata-16
$ grep font ~/.gvimrc
set guifont=Inconsolata\ Medium\ 16
I have usb interface (old maudio fast track). .asoundrc
pcm.dmixed {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
}
}
pcm.!default {
type plug
slave.pcm "dmixed"
}
ctl.!default {
type hw
card 1
}
where card 1 is Track [Fast Track], device 0: USB Audio [USB Audio]
Also, to set audio card ordering:
/etc/modprobe.d/alsa.conf:
options snd slots=snd-hda-intel,snd-usb-audio
# http://alsa.opensrc.org/MultipleCards#The_newer_.22slots.3D.22_method
My graphics card that is part of motherboard is
00:0d.0 VGA compatible controller: nVidia Corporation C61 [GeForce 6150SE nForce 430] (rev a2)
$ cat /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
Identifier "Monitor0"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia" #Choose the driver used for this monitor
EndSection
Section "Screen"
Identifier "Screen0" #Collapse Monitor and Device section to Screen section
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24 #Choose the depth (16||24)
SubSection "Display"
Depth 24
Modes "1280x1024_75.00" "1024x768_75.00" #Choose the resolution
EndSubSection
EndSection
I like to swap ctrl and caps lock.
$ grep ctrl ~/.config/openbox/autostart
setxkbmap -option ctrl:swapcaps
I like W-w to show all applications, W-q to shutdown.
~/.config/openbox/rc.xml
I tried to set up juniper vpn but failed. Went all the way to installing 32bit java.. But not worth it.
I need to install VirtualBox.
Friday, September 9, 2011
libevent2 mingw
Tried libevent2 libevent-2.0.13-stable.tar.gz
on MinGW.
Didn't work.
event-config.h wasn't being created by make..
The make target was
./include/event2/event-config.h: config.h
/usr/bin/mkdir -p ./include/event2
echo '/* event2/event-config.h' > $@
echo ' *' >> $@
echo ' * This file was generated by autoconf when libevent was built, and post-' >> $@
echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $@
echo ' *' >> $@
echo ' * DO NOT EDIT THIS FILE.' >> $@
echo ' *' >> $@
echo ' * Do not rely on macros in this file existing in later versions.'>> $@
echo ' */' >> $@
echo '#ifndef _EVENT2_EVENT_CONFIG_H_' >> $@
echo '#define _EVENT2_EVENT_CONFIG_H_' >> $@
sed -e 's/#define /#define _EVENT_/' \
-e 's/#undef /#undef _EVENT_/' \
-e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@
echo "#endif" >> $@
Since MSYS' make failed to create event-config.h .. here is the shell script
on MinGW.
Didn't work.
event-config.h wasn't being created by make..
The make target was
./include/event2/event-config.h: config.h
/usr/bin/mkdir -p ./include/event2
echo '/* event2/event-config.h' > $@
echo ' *' >> $@
echo ' * This file was generated by autoconf when libevent was built, and post-' >> $@
echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $@
echo ' *' >> $@
echo ' * DO NOT EDIT THIS FILE.' >> $@
echo ' *' >> $@
echo ' * Do not rely on macros in this file existing in later versions.'>> $@
echo ' */' >> $@
echo '#ifndef _EVENT2_EVENT_CONFIG_H_' >> $@
echo '#define _EVENT2_EVENT_CONFIG_H_' >> $@
sed -e 's/#define /#define _EVENT_/' \
-e 's/#undef /#undef _EVENT_/' \
-e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@
echo "#endif" >> $@
Since MSYS' make failed to create event-config.h .. here is the shell script
Monday, July 11, 2011
Sunday, June 12, 2011
Les Paul Encoding
http://www.google.com/logos/2011/lespaul.html
#tune=
The data has the format:
can be 0 or 1.
If is 0, is 4 bits.
If is 1, is 10 bits.
can be 0 or 1.
If is 0, is 5 bits.
If is 1, is 20 bits.
So, the maximum datagram, word, chunk, or whatever is 32 bits. The smallest chunk is 11 bits.
There are 10 notes. And their values are (lowest note to the highest):
2, 6, 3, 0, 7, 1, 8, 4, 9, 5
do, re, mi, fa, sol, la, ti, do, re, mi.
For a monophonic chunk ( is 0), is 4 bits but reversed.
For example, for ti (value is 8 base 10), it is 0001, not 1000.
For a polyphonic chunk ( is 1), is 10 bits. NOT reversed.
For example, for fa, la, do (0, 1, 4 base 10), it is 1100100000 (index 0, 1, 4 are set).
is always reversed. It could be 5 bits (less than 32) or 20 bits.
Probably the unit is 1/10 milliseconds..
TODO: write a program that actually demonstrates this.
#tune=
The data has the format:
If
If
If
If
So, the maximum datagram, word, chunk, or whatever is 32 bits. The smallest chunk is 11 bits.
There are 10 notes. And their values are (lowest note to the highest):
2, 6, 3, 0, 7, 1, 8, 4, 9, 5
do, re, mi, fa, sol, la, ti, do, re, mi.
For a monophonic chunk (
For example, for ti (value is 8 base 10), it is 0001, not 1000.
For a polyphonic chunk (
For example, for fa, la, do (0, 1, 4 base 10), it is 1100100000 (index 0, 1, 4 are set).
Probably the unit is 1/10 milliseconds..
TODO: write a program that actually demonstrates this.
Thursday, March 31, 2011
SSH tip
ssh root@somehost
... takes a long time before password prompt
So, in ~/.ssh/config:
GSSAPIAuthentication no
... takes a long time before password prompt
So, in ~/.ssh/config:
GSSAPIAuthentication no
Wednesday, March 16, 2011
how flash ads get your cookie
A Flash advertisement, hosted on http://ad.com/ad.swf, displayed on http://yoursite.com, can get cookie and send it to ad.com.
Example setup: http://pastehtml.com/view/1dntfa4.html
A swf is hosted on dl.dropbox.com. And it gets document.cookie of pastehtml.com and sends it to dl.dropbox.com.
The swf is using ExternalInterface.call() to execute arbitrary javascript.
This technique is explained here:
http://lcamtuf.blogspot.com/2011/03/other-reason-to-beware-of.html
Code:
So, you can execute arbitrary javascript by passing a string to ExternalInterface.call():
"\\")); YOUR SCRIPT HERE }catch(e){}//""
And, you can do cross domain xhr using swf (only to the domain where swf is hosted at).
Example setup: http://pastehtml.com/view/1dntfa4.html
A swf is hosted on dl.dropbox.com. And it gets document.cookie of pastehtml.com and sends it to dl.dropbox.com.
The swf is using ExternalInterface.call() to execute arbitrary javascript.
This technique is explained here:
http://lcamtuf.blogspot.com/2011/03/other-reason-to-beware-of.html
Code:
So, you can execute arbitrary javascript by passing a string to ExternalInterface.call():
"\\")); YOUR SCRIPT HERE }catch(e){}//""
And, you can do cross domain xhr using swf (only to the domain where swf is hosted at).
Sunday, January 2, 2011
minecraft ubuntu ibus keyboard problem
ibus blocks input for minecraft or some java games (https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/481656)
so, launch those java programs with XMODIFIERS=
so, launch those java programs with XMODIFIERS=
XMODIFIERS= java -Xmx512M -cp Minecraft.jar net.minecraft.LauncherFrame
Thursday, December 16, 2010
llvm setup
LLVM Getting Started
mv ~/Downloads/clang-2.8 ~/Downloads/llvm-2.8/tools/clang
cd ~/Downloads/llvm-2.8
./configure --prefix=~/opt/llvm
make -j 12
make install
cd ~/opt/llvm
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ $HOME/opt/llvm/include
mv tags ~/.vim/tags/llvm
~/.vimrc
"au BufAdd,BufNewFile * nested tab sball
set tags+=~/.vim/tags/llvm
nmap <C-\> :tab split<CR>:normal evBy<CR>:exec "tag " . @"<CR>
Subscribe to:
Posts (Atom)