Yeah, someone really dropped the ball here. If you see this when you try to yum install gcc:
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.12-1.80.el6_3.7.x86_64 (updates)
Requires: kernel-headers
Error: Package: glibc-headers-2.12-1.80.el6_3.7.x86_64 (updates)
Requires: kernel-headers >= 2.2.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Then try doing this: sudo yum --disableexcludes=main install kernel-headers-*.el6.openlogic.x86_64
I don't know who's the idiot who put exclude=kernel* in /etc/yum.conf to break installing gcc, but...you're an idiot.
Capistrano scares the shit out of me. I'd rather know what I'm deploying, rather than rely on some foreign script, thank you very much. To install Errbit and deploy with Passenger through nginx, try this:
git clone https://github.com/errbit/errbit.git rake errbit:copy_configs vi config/config.yml # and change hostnames / SMTP settings vi config/mongoid.yml # and change production mongo settings echo "Errbit::Application.config.secret_token = '$(bundle exec rake secret)'" > config/initializers/secret_token.rb RAILS_ENV=production rake assets:precompile RAILS_ENV=production rake db:mongoid:create_indexes RAILS_ENV=production rake db:seedThen add something like the following to your nginx config:
server {
listen 8080;
server_name errbit.example.com;
root /wherever/errbit/public;
passenger_enabled on;
rails_env production;
}
I came across an interesting video on the web that I wanted to watch offline, but it played through a Flash application, there were no download links, grabbing the stream by looking through the HTML/DOM was nontrivial, and the youtube-dl mainstay didn't work. tcpdump to the rescue!
First, install the Heirloom mailx client with yum install mailx. The NSS certificates included with the AMI are either out of date or incomplete, so you've got to grab the Equifax root cert and set it up yourself, like this:
wget https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.cer certutil -d ~/.mailcerts/ -A -t TC -n "Equifax Secure Certificate Authority" -i Equifax_Secure_Certificate_Authority.cerThen set up your ~/.mailrc like this:
set smtp-use-starttls set smtp=smtp://smtp.gmail.com:587 set smtp-auth=login set smtp-auth-user="your_username@example.com" set smtp-auth-password="your_password" set from="your_username@example.com" set nss-config-dir="~/.mailcerts" set ssl-verify=warnThat last "ssl-verify=warn" line looks pretty dangerous, and it definitely could be. I needed it because otherwise mailx would bark with Comparing DNS name: "smtp.gmail.com" Continue (y/n)? and...giving up, instead of accepting any input. For whatever reason my Debian box works fine without this line. Also, one could use this line without setting up the root certificate appropriately, but that's playing a bit too fast and loose for me.
With this configuration you should be good to go with: echo "body here" | mailx -s "Subject here" recipient@example.com
Yep, I had a reason to break out my old MBP and install the newest version of OS X on it. It works wonderfully for a five year old box (the SSD sure helps!), except for not being able to sleep properly. What worked for me was disabling "safe sleep" a la this hint.
sudo pmset -a hibernatemode 0 sudo nvram "use-nvramrc?"=falseThen restart. You can also remove /private/var/vm/sleepimage to save some space, which is nice.
...well, except for the cipher suites that require an OpenSSL >= 1.0.0, but that's an adventure for another day.
wget http://redmine.lighttpd.net/attachments/download/1395/ssl-compression.diff wget http://ftp.us.debian.org/debian/pool/main/l/lighttpd/lighttpd_1.4.31-3.debian.tar.gz wget http://ftp.us.debian.org/debian/pool/main/l/lighttpd/lighttpd_1.4.31.orig.tar.gz tar xvzf lighttpd_1.4.31.orig.tar.gz cd lighttpd-1.4.31/ tar xvzf ../lighttpd_1.4.31-3.debian.tar.gz vi debian/control [and get rid of the dpkg-dev version dependency] vi debian/rules [and get rid of the "export=config" line and the previous backslash] patch -p1 <../ssl-compression.diff debuild -us -uc [then install all of the dependencies it barks about and try again...] cd .. sudo dpkg -i lighttpd_1.4.31-3_amd64.deb sudo /etc/init.d/lighttpd restartAnd make sure these options are in your lighttpd ssl.conf:
ssl.cipher-list = "RC4-SHA:AES256-SHA:AES128-SHA:DES-CBC3-SHA"
ssl.honor-cipher-order = "enable"
ssl.use-sslv2 = "disable"
ssl.use-sslv3 = "disable"
ssl.use-compression = "disable"
Unable to start nfsd or portmap in Debian? Getting weird errors in /var/log like the following?
auto lo iface lo inet loopback
It's released! Grab it while it's hot.
In preparation for a pending semi-major release of unpkg, I needed to compile some source for other architectures and older versions of Mac OS X on my Snow Leopard MacBook Pro. After quite some time DuckDuckGoing and wrestling with gcc, I came across these combinations of environment variables that seem to do the trick. (The following, of course, require the appropriate 10.4 and 10.5 SDKs to be installed in /Developer/SDKs.)
10.4 and PowerPC
CC="gcc-4.0 -arch ppc" \ CXX="g++-4.0 -arch ppc" \ CFLAGS="-mmacosx-version-min=10.4" \ CPPFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -nostdinc \ -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \ -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include" \ LDFLAGS="-arch ppc -mmacosx-version-min=10.4 \ -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib \ -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --build=`uname -p`-apple-darwin --host=powerpc-apple-darwin10.4 and i386
CC="gcc-4.0 -arch i386" \ CXX="g++-4.0 -arch i386" \ CFLAGS="-mmacosx-version-min=10.4" \ CPPFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -nostdinc \ -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \ -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include" \ LDFLAGS="-arch i386 -mmacosx-version-min=10.4 \ -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib \ -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" \ ./configure10.5 and x86_64 -- the 10.4 gcc-4.0 can't compile for x86_64, so we have to use 10.5 instead.
CC="gcc-4.2 -arch x86_64" \ CXX="g++-4.2 -arch x86_64" \ CFLAGS="-mmacosx-version-min=10.5" \ CPPFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -nostdinc \ -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \ -I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include \ -isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include" \ LDFLAGS="-arch x86_64 -mmacosx-version-min=10.5 \ -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib \ -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk" \ ./configureThen combine the binaries, like so: lipo foo-i386 foo-ppc foo-x86_64 -output foo-fat -create.
Problem: you acquire a MKV file you want to play on your iPad. It's already H264/AAC, which the iPad can handle, so you don't want to re-encode it.
Solution: extract the tracks with mkvextract, and mux them into an iPad-friendly MP4 with MP4Box.
Sometimes, though, you'll get audio in a non-AAC format (e.g., MP3 or AC3). This requires conversion.
Sometimes, at work, we have terrible internet latency. This makes every page loaded count. I use DuckDuckGo as my primary search engine, and sometimes poor caching and latency combine to create a few seconds between starting to load the page and entering my query. So I whipped up a little Bookmarklet to bring up an equivalent search box, instantly. Hooray JavaScript! (The only time I'll ever say that...)
Here, drag: DDG
Works wonderfully as a hot-key, e.g., cmd-2 in Safari as the second link in my Bookmarks bar.
Like many programmers, I was introduced to the craft through a BASIC dialect, specifically a MacOS-only one named METAL. I was taking extracurricular classes in C++ at the time, but the SIOUX (Simple Input Output User eXchange, i.e., the I/O offered by cin/cout) Mac runtime we used couldn't do anything graphical.
I can't remember how I stumbled upon METAL, but I have fond memories of heading to my friend's house, putting Cowgirl by Underworld on repeat, and seeing what we could get this simple language to do. We never created anything ground-breaking, of course -- a few simple point-'n'-shoot pseudo-3D games, for example -- but man would those coding sessions be serious.
Upon entering high school, we moved on to bigger and better languages. My friend found the Macromedia Flash MX (ca. 2002?) application on our school's computers, and I somehow dove deep into Java. I remember when version 1.5 (...5.0) came out, and thinking that generics and auto(un)boxing were the shit.
Anyway. METAL v1.7.3 was nevertheless my bread and butter for a few years. I recall checking its website once, noticing that an incredible v2.0 was on its way. To this day, the website still has "METAL v2.0 ULTRA" listed as ??? percent done.
That is, the Wayback Machine's version of the website. Naturally, the author graduated, and his personal website disappeared. It's still available here: http://web.archive.org/web/20080327004511/www.iit.edu/~sarimar/GDS/. METAL can be downloaded from there.
It still runs on Snow Leopard through Rosetta. Trying to run code results
in a crashing runtime, but when "compiled" the resultant executable works fine.
If I ever stumble upon some old code I've written in METAL I'll post the
atrocities. And I owe its author, Marin Saric, a beer or two.
I can't vouch for the Extra Large or Double Extra Large ones, but the Quadruple Extra Large ones use Nehalem-based Gainestown Intel Xeon X5550 @ 2.67GHz.
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU X5550 @ 2.67GHz stepping : 5 cpu MHz : 2666.760 cache size : 8192 KB physical id : 0 siblings : 1core id : 0 cpu cores : 1 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca popcnt lahf_lm bogomips : 5337.91 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:The Authoritative List of Packages Needed to Comile the WikiReader Firmware
This is for a 32-bit Ubuntu Karmic schroot (as outlined in doc/Using-schroot.text) on a 64-bit Debian stable installation.
flex bison ocaml python python-gd gforth guile-1.8 gawk php5-cli php5-sqlite sqlite3 xfonts-utils cjk-latex dvipng qt4-qmake libqt4-dev sudo wget
Build as listed on the website. Video uses X and audio goes through CoreAudio, so you don't need SDL. A few other bits of information, though:
Just modprobe snd_pcm_oss and snd_mixer_oss, and restart udev. Then relive all your old Mac game meories through SheepShaver...
You'll want to use something called the Compose Key. Good instructions on this site, but here's a quick installation summary:
On my Debian boxes I use evilwm as my window manager, because it gets out of my way in just the way I like. Hence, I don't use gnome-terminal or kterm or ETerm or what have you; xterm has worked perfectly fine.
Nevertheless, I frequently spawn a lot of terminals, and the 5MB that each xterm process eats up (not including the 3MB bash does) add up after I fill a few virtual desktops with terminals. Xterm is also quite slow: cat'ing a 15K line banner output takes ~4 seconds on my netbook.
Hence, I went looking for replacements. Rxvt takes ~2MB per instance and cats the same file in ~1.2 seconds. Mrxvt takes ~3MB and ~0.5 seconds. Rxvt-unicode takes the cake, though, at ~3 MB and ~0.3 seconds. The real kicker, though, is its "daemon" mode, in which only once process is spawned for all "client" terminals, saving a lot of RAM. (Just hope it doesn't crash!)
Here's my setup:
URxvt*scrollBar: false URxvt*reverseVideo: true
I've tested SheepShaver with Mac OS 7.6.1 and Mac OS 8.1 with a 4MB OldWorld ROM. Sound works (even though ESD isn't used), video works, haven't tried ethernet. (all done on my current Debian unstable Intel Atom netbook.) The same instructions work for BasiliskII.
--- old/SheepShaver/src/Unix/autogen.sh 2007-06-13 14:09:05.000000000 +0200 +++ ss2/SheepShaver/src/Unix/autogen.sh 2009-09-15 12:21:32.000000000 +0200 @@ -40,13 +40,13 @@ aclocalinclude="$ACLOCAL_FLAGS"; \ (echo $_echo_n " + Running aclocal: $_echo_c"; \ - aclocal $aclocalinclude; \ + aclocal-1.4 $aclocalinclude; \ echo "done.") && \ (echo $_echo_n " + Running autoheader: $_echo_c"; \ - autoheader; \ + autoheader2.59; \ echo "done.") && \ (echo $_echo_n " + Running autoconf: $_echo_c"; \ - autoconf; \ + autoconf2.59; \ echo "done.") rm -f config.cache
SheepShaver configuration summary: SDL support ...................... : none FBDev DGA support ................ : yes XFree86 DGA support .............. : yes XFree86 VidMode support .......... : yes Using PowerPC emulator ........... : yes Enable JIT compiler .............. : yes Enable video on SEGV signals ..... : yes ESD sound support ................ : no GTK user interface ............... : no mon debugger support ............. : no Addressing mode .................. : real Bad memory access recovery type .. : siginfo Configuration done. Now type "make".
--- sys_unix.cpp.old 2009-09-15 12:28:54.000000000 +0200
+++ sys_unix.cpp 2009-09-15 12:29:06.000000000 +0200
@@ -883,11 +883,6 @@
}
}
#endif
-#ifdef CDROM_DRIVE_STATUS
- if (fh->cdrom_cap & CDC_DRIVE_STATUS) {
- return ioctl(fh->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) == CDS_DISC_OK;
- }
-#endif
cdrom_tochdr header;
return ioctl(fh->fd, CDROMREADTOCHDR, &header) == 0;
#elif defined(__FreeBSD__) || defined(__NetBSD__)Just contributing my method. General outline: install OSX on an external drive from a MacBook, then copy the installation to the internal Wind drive.
Requirements:
This public service announcement was brought to you by the "Why The Fuck
Don't My Bit Shifts Work" Department.
Goodness, that was amateur.
Run it is root.
Debian unstable just upgraded to xserver-xorg-video-intel version 2.8.0.
(released two days ago -- who says Debian is out of date?)
This release is notable in that it removes support for EXA and DRI1,
leaving only UXA and DRI2 for acceleration. Considering my previous
benchmarking attempts, I thought it was only right to check the new
drivers.
Sid has recently moved grub to grub-legacy and made grub 2 the default. My installation went fine -- all I had to do was remove grub-legacy (because of some conflicting man pages) and install os-prober and recreate grub.cfg to recognize my WinXP partition.
Hooray new packages in Debian!
There's been a lot of development with regard to Intel's new
UXA acceleration framework for its GMA integrated graphics chips.
Benchmarks over at Phoronix have shown mixed results, so I decided to
run some tests myself.
Tests run on an Asus Eee PC 900HA, with a 1.6GHz Atom N270 processor
and integrated GMA 950 graphics, gtkperf 0.40, default Debian kernel 2.6.30,
Xorg 1.6.2, and Intel driver 2.7.1. (i.e., an up to date unstable installation.)
I'm nowhere close to having the knowledge of a true Debian Developer, but I've used the OS enough to want to create my own packages. In this circumstance, I wanted a newer version of evilwm (it's 1.0.0 in the repo, and 1.0.1 is the newest release) and I wanted to change the mouse button behaviour. The steps I followed (I'm sure there's a cleaner way -- do inform me).
Tap to click on a trackpad is a terrible idea. When I want to click, I'll hit the damn button myself, thank you very much. My ratio of unwanted to wanted tap-to-clicks is understandably undefined.
Three systems need to be configured for this to work: the kernel, the Xorg driver, and the X server itself.
Section "InputDevice"
Identifier "Configured Mouse"
Option "CorePointer"
Driver "synaptics"
Option "Device" "/dev/input/event10"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
Option "MaxTapTime" "0"
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "1"
EndSection
Great news: almost everything works out of the box. I was concerned about hardware support, and struggling with wireless, so I just apt-pinned the latest kernel from unstable, and it works perfectly.
I'm using evilwm as my window manager, because I love how it gets out of my way and lets me do my work. I'd post a screenshot, but there's no eye-candy to show off... =) I've also had to hack Firefox into shape so it doesn't take up silly amounts of vertical pixels.
I just picked up an Asus Eee PC 900HA. It, currently, has the best mix of size, cost, and capabilities for what I want in a netbook. I'm keeping Windows on it to use Ableton Live and for "just in case" purposes. Here's documentation of what I've done to re-partition, keeping the provided Windows installation, and install Debian testing.
Very much so. With two decks, equalizers, and a few other affects,
CPU usage doesn't appear to go higher than ~20% or so.
This may just become my new gig rig!
Just make sure to install
QuickTime
if MP3s are at all part of your setup. Cheers.
Done on a standard Debian installation with a sane toolchain installed.
checking for correct version of gmp.h... yes checking for correct version of mpfr.h... yes checking for version 0.10 of PPL... yes checking for correct version of CLooG... yes
What could be better than flexing a bit of matrix-multiply muscle? We're going to use Daniel Hackenberg's hand-coded asm routines, because they achieve ridiculous performance.
diff -urN matmul-old/COMPILE.sh matmul/COMPILE.sh
--- matmul-old/COMPILE.sh 2008-02-29 06:30:08.000000000 -0500
+++ matmul/COMPILE.sh 2009-06-06 17:12:39.000000000 -0400
@@ -29,15 +29,15 @@
${CELL_BIN}/spu-gcc -o matmul_spu matmul_spu.o matmul_spu_simd.o
# embedd SPE object file into PPE object
-echo "${CELL_BIN}/ppu-embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o"
-${CELL_BIN}/ppu-embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o
+echo "${CELL_BIN}/embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o"
+${CELL_BIN}/embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o
# compile PPE code
-echo "${CELL_BIN}/ppu-gcc -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c"
-${CELL_BIN}/ppu-gcc -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c
+echo "${CELL_BIN}/gcc -m64 -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c"
+${CELL_BIN}/gcc -m64 -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c
# link SPE and PPE object files together
-echo "${CELL_BIN}/ppu-gcc -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2"
-${CELL_BIN}/ppu-gcc -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2
+echo "${CELL_BIN}/gcc -m64 -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2 -lpthread -L/home/timdoug/libspe2-2.2.80-95"
+${CELL_BIN}/gcc -m64 -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2 -lpthread -L/home/timdoug/libspe2-2.2.80-95
rm -f matmul_spu *.o
timdoug@ps3:~/matmul$ ./matmul -s 6 -m 3072 Fast matrix multiplications on Cell (SMP) systems. Copyright (C) 2007 Daniel Hackenberg, ZIH, TU-Dresden Running matrix multiplication of 3072x3072 matrices using 6 SPEs... Initializing arrays with random numbers... done! Starting SPE calculations... Done! Performance results: Performance of SPE 0: 25.35 GFLOPS Performance of SPE 1: 25.35 GFLOPS Performance of SPE 2: 25.36 GFLOPS Performance of SPE 3: 25.36 GFLOPS Performance of SPE 4: 25.36 GFLOPS Performance of SPE 5: 25.36 GFLOPS Aggregated performance for all 6 SPEs: 152.14 GFLOPS. PPE-measured performance of matrix multiplication using 6 SPEs: 152.11 GFLOPS. (of 153.60 GFLOPS theoretical peak at 3200 MHz clock frequency)152 SP GFLOPS is crazy absurd for $400. The above taks ~7.5 seconds to run, but most of the time is in initializing the matrix with random values!
Edit /etc/security/limits.conf, open up a new shell, and have fun with ulimit.
Fun summer projectsSo. With a summer ahead of me, there are a few things I want to get into now that I have the time. A list:
Code like this:
",".join(nodes_list[:num_nodes])
Objects, strings (finally sane in 3.0), lists, list slices...
I conveniently forgot the password for my year-old PS3 installation, but conveniently recognized that kboot is a little Linux installation in and of itself. Hence, mounting /dev/ps3da1, chrooting into it, and running passwd does the trick.
Debian is aptly (hah!) fickle with regard to rsh -- by default, if you have OpenSSH installed, rsh is just a symlink to it. For my research I need rsh in order to get around the overhead that ssh incurs; security isn't an issue because the machines are on a private network anyway.
I purchased a PS3 last summer with the express intent of running some simulations and benchmarks (and playing Gran Turismo 5 Prologue), but never got around to it (the first part, that is).
A few interesting links and PDFs:
I'm intrigued by CUDA as well. We'll see where that goes.