Genres of programmers

List is a work in progress:

pythonistas – python

rubyist – ruby

Posted in Uncategorized | Leave a comment

CRUD

REST uses HTTP for all four CRUD (Create/Read/Update/Delete) operations

Reference: http://rest.elkstein.org/

One thing that is not part of a good REST design is cookies: The “ST” in “REST” stands for “State Transfer”

Posted in Uncategorized | Leave a comment

Mysql – Adding access to a dev server

[root@server ~]# mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL ON *.* TO sequelpro@'192.168.0.100' IDENTIFIED BY 'sequelpro';
Query OK, 0 rows affected (0.05 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
[root@server ~]#

Posted in Notes, Uncategorized | Leave a comment

Mac Terminal Hack – Grid Highlight

defaults write com.apple.dock mouse-over-hilite-stack -boolean yes
killall Dock

note: saw this hack on a youtube video:

Posted in Hack, Mac | Leave a comment

Mac Terminal Hack – Quick View

defaults write com.apple.finder QLEnableXRayFolders 1
killall Finder

Posted in Hack, Mac | Leave a comment

Example: rename files with ruby

#!/usr/bin/env ruby
# This script renames files with white spaces with
# files with underscores in the current working directory.

require 'fileutils'
Dir.glob("*\ *").each do |original_file|
underscore_file = original_file.gsub(" ","_")
FileUtils.mv(original_file,underscore_file)
puts "Renamed: #{original_file} => #{underscore_file}"
end

Posted in Example, Notes, Ruby | Leave a comment

How to check md5sum on OSX

[ 12:57:03 user@machine:~/Downloads/tech_apps ]
(0.42 0.49 0.45)$ md5 CentOS-5.6-i386-bin-DVD.iso
MD5 (CentOS-5.6-i386-bin-DVD.iso) = 181142a5845586579d5d4d96e43a4827

Posted in Example, Mac, Notes, Unix | Leave a comment