{{ message }}

Instantly share code, notes, and snippets.

🏠
Working from home

# Nurettin Onur TUĞCUnurettin

🏠
Working from home
Last active Aug 29, 2015
switch between us and tr keyboards while keeping modmap
View xkb.sh
 #!/bin/bash setxkbmap -query | grep "\Wtr" 1>/dev/null && setxkbmap us || setxkbmap tr xmodmap /home/nurettin/.Xmodmap
Created Apr 9, 2014
mechanize memory hog
View mechanize_history.rb
 browser= Mechanize.new do |m| m.history.max_size= 1 end @mech.get "https://www.google.com" @mech.history.clear GC.start
Created Sep 1, 2014
12rules sudoku http://www.stolaf.edu/people/hansonr/sudoku/12rules.htm
View 12rules.htm
 I thought about posting this in the "mathematics of sudoku" forum, but really what it is is a statement of the common (and maybe not so common) rules for solving Sudoku, both in plain English and in logical notation. If you are just interested in solving Sudoku, ignore the funny notation; if you are interested in the mathematics, enjoy the symmetry. I suggest that the following set of rules may constitute the entire set of "standard" methods (not including simple chain-based logic) used to solve Sudoku puzzles. Included here are:
Created Nov 30, 2014
fann_cpp tiny tutorial
View fann_cpp_train.cpp
 #include #include #include #include #include void prepare_data(std::string const &name){ std::ofstream file(name+ ".data", std::ios::trunc); file<< "4 2 1\n" << "0 0\n0\n"
Created Aug 9, 2015
ode gravity lost
View main.cpp
 #include #include #include #include dWorldID earth; dJointGroupID contact_joint_group; std::size_t const max_contacts = 10; dContact contact[max_contacts];
Last active Sep 13, 2015
View hst.rb
Created Jan 20, 2012
torquebox source setup
View source_setup.sh
 #!/bin/bash export MUJDE_HOME=\$(pwd) export MYSQL_HOME=\$MUJDE_HOME/mysql/faal export JRUBY_OPTS="--1.9 -J-Djruby.fork.enabled=true" export JAVA_HOME=\$MUJDE_HOME/kit/java/faal export TORQUEBOX_HOME=\$MUJDE_HOME/kit/torquebox/faal export JBOSS_HOME=\$TORQUEBOX_HOME/jboss export JRUBY_HOME=\$TORQUEBOX_HOME/jruby export PATH=\$MUJDE_HOME/bin:\$JAVA_HOME/bin:\$JRUBY_HOME/bin:\$MYSQL_HOME/bin:\$PATH export PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!a[\$i]++)printf s\$i;s=":"}}'<<<\$PATH`
Created Sep 29, 2012
linux dual sound card fix
View .asoundrc
 pcm. !default { type hw card 1 } ctl. !default { type hw card 1 }
Created Sep 29, 2012
crunchbang volume icon
View volumeicon
 [Alsa] card=hw:1 [StatusIcon] stepsize=5 lmb_slider=true onclick=xfce4-mixer theme=Default
Created Sep 29, 2012
crunchbang volume icon
View volumeicon
 [Alsa] card=hw:1 [StatusIcon] stepsize=5 lmb_slider=true onclick=xfce4-mixer theme=Default
You can’t perform that action at this time.