December 2011
1 post
3 tags
RSpec Rails be_a_new matcher
Passes if the object is a Widget and returns true for new_record?: object.should be_a_new(Widget)
Dec 30th
16 notes
March 2011
1 post
1 tag
Reset Heroku Database and Reload Seeds
Since heroku rake db:migrate:reset doesn’t work you should run: heroku pg:reset SHARED_DATABASE --confirm <APP_NAME> heroku rake db:migrate
Mar 17th
14 notes
April 2010
2 posts
3 tags
Apr 27th
5 notes
3 tags
Apr 27th
3 notes
February 2010
2 posts
3 tags
Variable argument lists in Cocoa →
Feb 27th
5 notes
4 tags
Cocoa Application Startup →
Feb 2nd
4 notes
December 2009
3 posts
4 tags
rake console: a custom irb instance for your ruby... →
Dec 20th
5 notes
2 tags
We could not complete your iTunes Store request.... →
Dec 20th
5 notes
2 tags
How to Unpack a Debian Source Package →
Dec 15th
5 notes
November 2009
1 post
2 tags
Versioning HTTP APIs →
Nov 7th
6 notes
August 2009
1 post
2 tags
Visor for OSX →
a system-wide terminal accessible via a hot-key
Aug 25th
1 note
June 2009
1 post
2 tags
Terminal.app Tab Namer v0.1 Alpha →
is a SIMBL plugin for Terminal.app on Leopard that lets you name your tabs.
Jun 10th
7 notes
April 2009
1 post
3 tags
irb readline support on Leopard →
Apr 29th
4 notes
March 2009
1 post
1 tag
Feedzirra →
is a new ruby feed library “built for speed”.
Mar 9th
3 notes
January 2009
3 posts
3 tags
Location of the MySQL Socket File in Different...
From #mysql_socket_location: "/tmp/mysql.sock", # default "/var/run/mysqld/mysqld.sock", # debian/gentoo "/var/tmp/mysql.sock", # freebsd "/var/lib/mysql/mysql.sock", # fedora "/opt/local/lib/mysql/mysql.sock", # fedora "/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql "/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4 "/opt/local/var/run/mysql5/mysqld.sock",...
Jan 26th
6 notes
4 tags
Install MySQL and mysql gem on Mac OS X Leopard
Install MySQL server via MacPorts: sudo port install mysql5 +server Setup the database: sudo -u mysql mysql_install_db5 Configure MySQL to start up automatically when OS X boots: sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist Install mysql gem: sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5 Source. Socket location:...
Jan 19th
3 notes
4 tags
Adding Bash Completion for Git on Mac OS X Snow...
Copy this code and paste it into Terminal. This also should work for any *NIX. Update There are the easiest ways to add bash completion for git. For Mac OS X Install git via MacPorts: sudo port install git-core +bash_completion Then add the following lines at the end of your ~/.profile: if [ -f /opt/local/etc/bash_completion ]; then . /opt/local/etc/bash_completion fi For...
Jan 18th
9 notes
December 2008
1 post
Post for visitors from barushev.net
New admins form Netlux ISP have deleted my old site barushev.net. I have no backups but I’m not upset because old site was so outdated. This blog is my primary homepage now. Welcome.
Dec 7th
2 notes
November 2008
1 post
1 tag
Passing All Arguments from One JavaScript Function...
Function.prototype.apply should do the job: function debug() { if (settings.debug) { console.log.apply(this, arguments); } }
Nov 5th
8 notes
October 2008
4 posts
Lessons Learned while Building an iPhone Site →
Oct 28th
6 notes
3 tags
Firebug Console Object and API →
Firebug adds a global variable named “console” to all web pages loaded in Firefox. This object contains many methods that allow you to write to the Firebug console to expose information that is flowing through your scripts.
Oct 15th
4 notes
2 tags
“Calling preventDefault during any stage of event flow cancels the event, meaning...”
– Gecko DOM Reference
Oct 15th
2 tags
“If child is a reference to an existing node in the document, appendChild moves...”
– Gecko DOM Reference
Oct 9th
September 2008
5 posts
2 tags
A Simple jQuery Plugin Skeleton
(function ($) { $.fn.pluginName = function (settings) { settings = $.extend({ param: 'value' }, settings); return this.each( function () { var $this = $(this); // plugin code here } ); }; })(jQuery); http://gist.github.com/12656
Sep 24th
2 tags
CSS min-height Fast Hack
This hack which is a pure CSS solution will get a min-height working for IE6. MSIE 7.0 supports CSS min-height. selector { min-height: 500px; height: auto !important; height: 500px; } Min-Height Fast Hack
Sep 18th
3 tags
Using Kompare for Git Diffs
It’s possible to use kompare as a graphical diff viewer for git. I created file git-kompare in my /usr/local/bin/ directory with such content: git diff $* | kompare - I also created alias gk for this command in my ~.bashrc: alias gk='git-kompare' Now I can use gk command instead of git diff with all its options.
Sep 18th
1 note
1 tag
Bash Script That Deletes Itself
suicide.sh #!/bin/rm
Sep 16th
1 tag
Truncating a File to Zero Bytes
> log/development.log
Sep 16th
August 2008
1 post
2 tags
Removing a Remote git Branch
git push origin :branch_name
Aug 26th
November 2007
1 post
Nov 7th
January 2007
1 post
Hi
My name is Denis. I’m a web developer from Donetsk, Ukraine. This is my tlog.
Jan 28th