October 2011
4 posts
3 tags
How to connect to MongoDB from Node.js
Node, meet Mongo: nodejs-meet-mongo.js
3 tags
Rdio signup howto from outside US
Get and install the Tor Browser Bundle (We need Tor, Vidalia, Firefox, and Torbutton).
Start Vidalia.
On Firefox Torbutton click Toggle Tor status.
Click View the Network in Vidalia.
Memorize nicknames of US relays.
Click Settings, choose Advanced and Edit current torrc.
Insert nicknames comma separated after ExitNodes (ExitNodes nickname1, nickname2).
Insert this line somewhere:...
2 tags
When using iDefrag make sure you turn your screen brightness down before you reboot to keep the disks cooler.
1 tag
Git: How to upgrade from a remote branch
git fetch [remote]
git merge [remote]/[branch]
April 2011
2 posts
Amazon CloudFront with Custom Origin via Cyberduck
It took me some time to figure out how to enable Custom Origin in order to utilize Origin Pull on Amazon CloudFront via Cyberduck, although I tried this and even that, so I thought I would share how I made it work.
Create a CloudFront distribution.
Create a S3 bookmark in Cyberduck. Use your Origin Bucket hostname as server.
Edit the bookmark XML file. On a Mac it’s around...
3 tags
FastCGI Process Manager as a Service Management...
Here’s how to get FastCGI Process Manager (PHP-FPM) to work with Service Management Facility (SMF) on Solaris.
git clone git://gist.github.com/888451.git php-fpm svccfg import php-fpm/php-fpm.xml
Clone it here.
March 2011
1 post
Git clone and your submodules
After git clone don’t forget:
git submodule init git submodule update
December 2010
2 posts
5 tags
Pretty print JSON via command line
curl http://api.twitter.com/1/users/show/webjay.json | php -r "print_r(json_decode(fgets(STDIN)));"
2 tags
CakePHP 1.3 currently only supports SimpleTest 1.0.
1.1 will give you Call to undefined method CakeHtmlReporter::SimpleReporter().
November 2010
1 post
2 tags
How to get PID from a photo on Facebook
Goto photo album
Copy id from url
Goto photos.getAlbums
Enter id in uid
Get the aid from the album where the image is in
Goto photos.get
Enter aid
You should now be able to get the pid
May 2010
1 post
4 tags
git checkout [tag] .
`git checkout [tag] .` is great to avoid merge conflicts when upgrading a framework where you only mess in the files you created.
January 2010
1 post
4 tags
Twitter conversation bookmarklet
My way of a Twitter conversation bookmarklet: Twitter conversation
(Drag it to your browser’s bookmark bar)
Here’s an example: http://conv.smart.joyent.com/?tweet=http://twitter.com/dsearls/status/7749106265
October 2009
2 posts
4 tags
Huawei device gone
If you like me accidentally deletes your Huawei device, this article may help.
4 tags
localhosting: FileVault = 403 Forbidden
If you get 403 Forbidden after having turned FileVault on, the fix is to enable sharing for your Sites folder.
September 2009
2 posts
2 tags
jQuery vs document.getElementById
document.getElementById(‘someid’) = jQuery(‘#someid’).get(0)
If you don’t get it, you don’t need to know.
2 tags
Reinstall a Mac
You’ll need the original DVD that came with it and old ones require 10.5.5.
Update: If Snow Leopard, you just need to format the disk first.
July 2009
1 post
1 tag
MySQLDiff
If you like me use MySQLDiff to detect structure differences between two databases and create alter scripts I have a small tip for you here.
If you get the error: The configured Path for Session files () is not writeable! the reason is that session.save_path is unset in your php.ini.
June 2009
1 post
my Javascript isFloat
function isFloat (value) {
if (isNaN(value) || value.toString().indexOf(".") < 0) {
return false;
} else {
if (parseFloat(value)) {
return true;
} else {
return false;
}
}
}
Inspired by Simple isFloat() Function
January 2009
1 post
AirPort Extreme + Express
If you like me have an AirPort Extreme (n) + Express (g) and create a WDS network, the speed will be as fast as the slowest AirPort, which in my case was G, thus I made my Express only join my Extreme.
December 2008
1 post
3 tags
Pootle setup as non root via SVN
Login via SSH.
Go to a folder where you would like to have a working copy of Pootle
Get the branch or tag you like. I chose Pootle-1-2-0:
$ svn co https://translate.svn.sourceforge.net/svnroot/translate/src/tags/Pootle-1-2-0
$ cd Pootle-1-2-0
$ ./setuppath
$ ./setpath
$ ./pootlesetup.py bdist
$ ls dist/
Right there I hope you see something like Pootle-1.2.0.solaris-2.11-i86pc.tar.gz
...
September 2008
2 posts
2 tags
geek: cron job not running?
you: no!
geek: make sure your crontabs end with a blank line
3 tags
make Safari open targeted links in a new tab
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
August 2008
1 post
2 tags
rm -rf `find . -type d -name .svn`
– Recursively delete .svn directories
May 2008
2 posts
6 tags
a MacBook Air power supply can not charge a MacBook Pro, only keep it alive
4 tags
twitter@twitter.com and jaiku@jaiku.com doesn’t seem to work with Google Apps?
Solution: Enabling users to chat with people who aren’t using Google Apps.
April 2008
1 post
3 tags
How to press "p" when you can’t →
or rather how to solve “Error validating server certificate” in svnX
March 2008
4 posts
6 tags
More languages for your spell checker on your Mac →
To check spelling hit “shift-cmd-.”.
To change language in Pages: Click Inspector in the toolbar, then hit the Text Inspector button, then click More. You should see the settings for which dictionary to select there.
7 tags
Enable mod_rewrite on Mac OS X Leopard
sudo vim /etc/apache2/users/your-username.conf and change AllowOverride to AllowOverride All AuthConfig
1 tag
Howto make Time Machine backup to Airport Extreme
Make sure your Airport disk is shared and for Secure Shared Disks select With a disk password. I made the password empty
Next you should be able to select the drive.
1 tag
Can't connect to local MySQL server through socket...
If you get Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’ you should set:
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock
in your /etc/php.ini and do a sudo apachectl restart
February 2008
1 post
A Subversion checkout without the trunk folder:
svn co path ../path