Skip to content

Instantly share code, notes, and snippets.

@StandardNerd
StandardNerd / vhost.sh
Created November 1, 2009 18:25 — forked from trey/vhost.sh
#!/bin/sh
ME=your-username
DIR=/Users/$ME/Sites/$1
if [ ! -d $DIR ]
then
sudo -u $ME mkdir $DIR
sudo -u $ME touch $DIR/index.php
echo "<h1>$1</h1>" >> $DIR/index.php
fi
@StandardNerd
StandardNerd / yii dropdownlist -
Created June 11, 2012 08:41
yii DropDownList with option groups
Example 5: Generating dropdownlist with option groups.
from http://www.yiiframework.com/wiki/48/by-example-chtml/#hh4
If you need to generate dropdownlist using both optgroup and option tags use the following code.
<div class="cars-select">
<?php echo CHtml::dropDownList('Cars', 'car_id', array(
'Mazda'=>array(
'mazda-rx7'=>'RX7',
'mazda-rx5'=>'RX5',
sudo apt-get install build-essential zlib1g-dev libncurses5-dev exuberant-ctags ncurses-term mercurial mysql-server libmysqlclient15-dev sqlite3 libsqlite3-dev libopenssl-ruby1.8 libssl-dev wget curl zsh htop tree tmux subversion bison openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake php5-mysql php5-dev php5-curl php5-gd php5-imagick php5-mcrypt php5-memcache php5-mhash php5-pspell php5-snmp php5-sqlite php5-xmlrpc php5-xsl git ttf-inconsolata libevent-dev libncurses5-dev libapache2-mod-php5 libpq-dev libapache2-mod-php5 php5-cli php5-common php5-cgi imagemagick libmagickwand-dev locate phpmyadmin
===
in .zshrc hinzufügen am Ende:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
===
zlib: http://www.betamahster.us/blog/?p=210
wget http://www.zlib.net/zlib-1.2.7.tar.gz
Stand:
- Mehrsprachiges Menü bei der slowakischen Büchergesamtliste
behoben.
- Die Darstellung der Kaschauer Zeitung (vgl meine letzten mails zum Thema Navigation)
heute abend.
- Die doppelte Anzeige einzelner Zeitungsseiten innerhalb des Kaschauer Eperieser Kundschaftblatt (1858 / 1870 / 1871)
behoben.
@StandardNerd
StandardNerd / capybara cheat sheet
Last active October 20, 2016 13:09 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
sudo apt-get install tmux build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
# generating ssh key
ssh-keygen -t rsa -b 4096 -C "joon.ch@gmail.com"
# add generated ssh key id_rsa.pub to repository/account
# install chruby https://github.com/postmodern/chruby
wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
tar -xzvf chruby-0.3.9.tar.gz
@StandardNerd
StandardNerd / gvim.md
Created December 13, 2018 13:09
gvim installation instructions

Vim Install/Compile

Debian/Ubuntu Machines

Tested on

  • Ubuntu v12.04 LTS
  • Ubuntu v12.10
  • Ubuntu v13.xx
  • Ubuntu v14.04 LTS
@StandardNerd
StandardNerd / Gemfile
Created June 21, 2019 08:42
Gemfile for Spree 4.0 Alpha & Rails 6.0.0.rc1
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.2'
gem 'spree', git: 'https://github.com/spark-solutions/spree.git', branch: 'feature/rails-6'
gem 'spree_auth_devise' , github: 'spree/spree_auth_devise', branch: 'master'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: 'master'
gem 'acts-as-taggable-on', '~> 6.0', github: 'spark-solutions/acts-as-taggable-on', branch: 'fix/rails-6-and-failing-specs'
gem 'awesome_nested_set', '~> 3.1.4', github: 'collectiveidea/awesome_nested_set', branch: 'master'
@StandardNerd
StandardNerd / oktoberfest.php
Last active November 17, 2020 22:11
PHP Exercise
<?php
require_once 'participant.php';
$bob = new Participant('Bob');
$bill = new Participant('Bill');
$bob->surviveOktoberfest();
$bill->surviveOktoberfest();
@StandardNerd
StandardNerd / gist:70226c8857c829d4bca5fc1514c0f15b
Created November 17, 2021 09:13 — forked from coffeemug/gist:6168031
The fun of implementing date support
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.