May 2011
2 posts
git rm'ing all deleted files
Say you deleted a bunch of files and/or folders in a project. Instead of like git rm path/to/file or even git rm -r path/to/folder/* you could like all git add -u and BAM! done.
May 10th
3 notes
My "Beginning Game Development with HTML 5"...
So I’m taking the Beginning Game Development with HTML 5 course (or, participating in that study group), and I decided to blog about my project here. The reason I’ve decided to take this class is to get the game my wife and I are working on, Азбука (Azbuka) back on track. The reason I stopped developing this game is because I got stuck on how to architect the game in a way that would...
May 3rd
5 notes
April 2011
1 post
Showing SQL logging in rails console
After the third time searching how to do this, I figured it’s time to put it up here as a note to self for the next time: logger = Logger.new(STDOUT) ActiveRecord::Base.logger = logger ActiveResource::Base.logger = logger
Apr 1st
January 2011
1 post
finding random instances of a model
I find myself doing this somewhat often, so I thought I’d share. Assuming you have a User model and you want to find a random user: u = User.find(1 + rand(User.all.count)) Sometimes this returns a RecordNotFound if the user has been deleted; otherwise, it’s a handy code snippet.
Jan 5th
1 note
August 2010
3 posts
Six Keys to Being Excellent at Anything →
Aug 25th
10 notes
Ruby "or" vs. "||" gotcha
In irb: >> truth = nil or true => true >> truth => nil >> truth = nil || true => true >> truth => true
Aug 9th
1 tag
Notes on learning Erlang: Chapter 2
Here are the thoughts/questions I had while reading chapter 2 of the “Erlang Programming” book: Atoms What are atoms most similar to in Ruby, the language I know best? Atoms are like symbols in Ruby, although they’re used differently. Interesting fact: Although atoms can be started with a period (.) which will be ignored, they can’t be started with two or more periods...
Aug 2nd
July 2010
2 posts
1 tag
Notes on learning Erlang
I’ve started to learn Erlang as one of the first tasks at my new job at Snooty Monkey. I am reading the O’Reilly “Erlang Programming” book. Here are some of my notes and questions as I read this book and try it out on my Ubuntu 10.04 system: Installation was fairly straightforward. I downloaded the source from erlang.org. Before starting the install, I ran sudo apt-get...
Jul 19th
First Impressions on NIXTY.com
I was encouraged, if somewhat skeptical, when I read about NIXTY sometime last year. ‘Empowering education for everyone’ sounded too good to be true. Nevertheless, as someone who’s previously wanted to build something similar, I looked forward to this web app existing. Well, today NIXTY opened up their service for everyone, and I have to admit I’m not disappointed,...
Jul 9th
June 2010
1 post
Strange error
If you ever get an error like this: Errno::EAFNOSUPPORT - Address family not supported by protocol - socket(2): make sure you’re not trying to e.g. access localhost from within the cloud :~)
Jun 15th
February 2010
1 post
Interesting company: AeroFarms
I recently came across an interesting company: AeroFarms. The use aeroponics to grow leafy greens. I like the fact that they include a few numbers in comparing their method to traditional/well-known methods. However, there are a lot more numbers they could provide: Energy: Watts used per square foot for an AeroFarms system? Water: Liters or gallons used per square foot anually? Labor: how...
Feb 11th
January 2010
1 post
How to find the max value, then the key of a hash...
my_hash = {:a => 1, :b => 12, :c => 23, :d => 3 } max_value = my_hash.values.max #23 max_value_key = my_hash.key(max_value) #:c
Jan 17th
November 2009
1 post
How to change environments in the console
 Make sure the test database is up to date: rake db:reset RAILS_ENV=test rake spec:db:fixtures:load RAILS_ENV=test #rails 2.x rake db:fixtures:load RAILS_ENV=test #rails 3.x Work with the test data in the console: script/console test #rails 2.x rails c test #rails 3.x
Nov 22nd
July 2009
1 post
Path to Freedom →
3 tons/year on 0.1 acre (2700 kg/year on 400 m^2)
Jul 12th
May 2009
1 post
Laser can Switch a Film Back and Forth between... →
The material in question is vanadium dioxide, somewhat of a rare material. Fortunately, if an exotic material can do it, so can a meta-material made of something very common (e.g. carbon), in the right configuration. Now only if they would hurry up and make those nanofactories…
May 1st
April 2009
3 posts
Case Study - Charlwood Integrated Kitchen
via charlwood.com.au Posted via web from ph0rque | Comment »
Apr 23rd
Apr 20th
Self-Sustaining Buildings
So I’ve been thinking about several things lately. Here’s a comment on HN I made not too long ago: …what (all) people need is not money, but rather a comfortable place to live, healthy food to eat, clean water to drink, and medical attention as needed (Level 0.5 of Maslow’s hierarchy of needs). Another fact that I’ve been pondering is the trend for more and more...
Apr 15th
1 note
March 2009
6 posts
Timeline_Fu: activity feeds made awesome. →
I kept trying to find this after reading it one time…
Mar 31st
Yaripe (Yet Another RESTful in_place_edit) →
Other RESTful inplace edit plugins mentioned here, as well.
Mar 16th
Note to self: try out this textmate-like editor... →
Mar 16th
1 tag
3dCAD: functions
After completing the first 6 chapters of Eloquent Javascript and beginning to wrap my mind around functional programming, I decided to take a first stab at defining functions, embedded below in a gist (I’ll add it to a file in my github project later today). These functions correlate directly to the operations listed in the mockups I put up in an earlier post. One advantage of doing it this...
Mar 6th
Sites like this one make me wish I had a sense of... →
…or at least could learn design.
Mar 2nd
1 tag
3dCAD, continued
This is a continuation of my thoughts regarding a browser-based 3D CAD app. For my first post, see this link. In the comments of my last post, I was alerted to a FireFox plugin called Canvas:3D. I tried for several days to get it to work, but was not able to.  Opera also has a canvas-3D implementation; however, it requires one to download the windows version, which alas I do not have. Both of...
Mar 2nd
February 2009
7 posts
Object-oriented CSS
code is on github
Feb 28th
1 tag
3D CAD as a JS app
I’ve had the idea of writing an open-source, online 3D CAD app for a long time. Recently, I’ve started working out the implementation details of what such an app might look like. It would be in JavaScript using the html canvas feature, and optimized (or at least targeted at) google chrome, since their JS rendering engine, V8, compiles the javascript down to bytecode and thus makes it a...
Feb 24th
1 note
Starting a Rails Edge App using git submodules →
Feb 24th
MLS (my little sister): swo what r u doing right now?
MLS: *so
me: hacking
MLS: ?!?!?!?!?!?!?!?!
MLS: YOU ARE HACKINHG!>!?!?!?!?!?!?!
me: yes
me: it means programming
MLS: oh
MLS: lol
MLS: i thought you were hacking somethin
MLS: lol
me: http://hacking-shindyapin.tumblr.com/post/79824588/mls-my-little-sister-swo-what-r-u-doing-right
MLS: don't type that!!!!!!!
me: too late
me: it's posted
me: don't worry, they won't know who you are
MLS: aaaaaaaaaahhhhhhhhhhhh
MLS: whew
Feb 20th
Ruby Tip
I learned something very interesting today: if you want to do something like variable.method(|i|i.blah) and the said method is defiend to recieve a &block, you can write a short cut: variable.method(&:blah). Hat tip to Moves on Rails.
Feb 18th
ShopBot →
Personal robotic tools… interesting.
Feb 16th
Playing with NoteFlight
So I had a song stuck in my head this morning; I decided to write the melody using NoteFlight.com. Here it is: It’s a lot more syncopated in my head, and there’s a progressive joining of other instruments, but this is a good start.
Feb 15th
January 2009
2 posts
Designing Web Interfaces: 12 Standard Screen... →
Someone should make Balsamiq templates for each of these… maybe that someone will be me, if I get a chance.
Jan 21st
jQuery techniques for a Good User Experience →
Jan 16th
December 2008
5 posts
Rethinking Houses
I’ve been helping put up drywall at my dad’s addition to his house for the last two days. This got me thinking, again, about building houses that are green. This post is a placeholder while I let my ideas gestate & ferment. Some links: http://www.passivehouse.us/passiveHouse/PHIUSHome.html http://www.passiv.de/ ...
Dec 27th
Rethinking Cars
I recently came across 37signals’ blog post about how the Wright brothers solved flight by breaking the problems into small chunks: “Build something that flies = big problem. So the Wright Brothers broke it down into smaller chunks: 1) wings, 2) controls, and 3) propulsion. Nice historical precedent for the idea of dividing problems into smaller and smaller pieces until you’re able to...
Dec 23rd
The power of representation: Adding powers of two →
Dec 16th
10 Useful Techniques to Improve your Interface... →
Dec 16th
Welcome!
So I am creating a new blog on my forays into hacking. I’m starting out in Ruby on Rails; I’d like to (have enough time to) explore other framework/languages. In particular, I hear great|grandiose things about Lisp and its flavors. Eventually, I want to start with hardware hacking (something I wanted to do ever since i-conserve, now bought by GreenBox). There’s a lot of great...
Dec 9th