Skip to content

Instantly share code, notes, and snippets.

View kblomqvist's full-sized avatar

Kim Blomqvist kblomqvist

View GitHub Profile
@kblomqvist
kblomqvist / foo bar baz ...
Created February 12, 2011 21:07
Additional foo-words
foo bar baz babar barbapapa barbazoo barbalala barbalib barbabeau barbabelle barbabright barbabravo
@kblomqvist
kblomqvist / gist:1065701
Created July 5, 2011 19:41
An idea of the new api for setting js into Zend_JQuery/Dojo onload script container
<?php
// Old way
// Set onload script
$this->jQuery()->onLoadCaptureStart(); ?>
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
@kblomqvist
kblomqvist / gist:1298706
Created October 19, 2011 15:51
Sleeping cat
|\ _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_)
@kblomqvist
kblomqvist / .htaccess
Created November 26, 2011 09:00
Nice URLs for legacy .html site
AddCharset UTF-8 .html
Options All -Indexes
ServerSignature Off
ErrorDocument 404 /404.html
RewriteEngine On
RewriteRule $^ index.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@kblomqvist
kblomqvist / _vimrc
Created December 5, 2011 17:20
Shortcuts for AVR32 development in VIM
map <F7> :w !make<CR>
map <F8> :w !make program start<CR>
@kblomqvist
kblomqvist / gist:1491107
Created December 17, 2011 19:18
Install Ruby
# MANDATORY! Install a bunch of support software
sudo aptitude install build-essential curl autoconf \
zlib1g zlib1g-dev bison openssl libssl-dev \
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev
# Install RVM locally
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# Install Ruby 1.9.3 locally
rvm install 1.9.3
@kblomqvist
kblomqvist / gist:1493392
Created December 18, 2011 13:18
Install PHP5 + Apache2 (with suPHP) + MySQL
su root
aptitude install php5 php5-mysql apache2-mpm-prefork libapache2-mod-suphp mysql-server
a2dismod php5 #disable mod_php
a2enmod rewrite #enable mod_rewrite
nano /etc/suphp/suphp.conf # docroot=${HOME}/sites
nano /etc/php5/cgi/php.ini # expose_php Off
echo -e "[mysqld]\nlocal-infile=0" > /etc/mysql/conf.d/my.cnf
@kblomqvist
kblomqvist / gist:1519708
Created December 25, 2011 20:33
Atmel - Tools Distribution
http://distribute.atmel.no/tools/opensource/
@kblomqvist
kblomqvist / gist:1519826
Created December 25, 2011 22:17
Build and install AVR32 Toolchain in Debian 6
su root
aptitude install curl flex bison libgmp3-dev libmpfr-dev autoconf build-essential libncurses5-dev libmpc-dev texinfo
git clone git://github.com/jsnyder/avr32-toolchain.git
cd avr32-toolchain
PREFIX=/opt/avr32tools make install-cross #You may need to run this multiple times, see Issue #8
aptitude install libusb-dev
PREFIX=/opt/avr32tools make install-dfu
cd .. && rm -rf avr32-toolchain
exit #leave root
export PATH=$PATH:/opt/avr32tools/bin
@kblomqvist
kblomqvist / gist:1574499
Created January 7, 2012 11:28
Fetch/install ZF1 locally
mkdir -p ~/workspace ~/bin
svn co http://framework.zend.com/svn/framework/standard/trunk/ ~/workspace/zf
ln -s ~/workspace/zf/bin/zf.sh ~/bin/zf