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.
This is a tumblelog, kinda like a blog but with short-form, mixed-media posts with stuff I like. Scroll down a bit to start reading, or a bit more to read more about me.
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.
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 allow rapid addition of logic to the game, since we had a lot of ideas on how to improve it beyond our initial vision.
The game is for pre-schoolers who want to learn the Russian language. It is a combination of starfall.com ABCs, a learning method called Азбука Жукова, and other ideas. At this point, the logic is really simple, although we want to add sever other things eventually. Specifically, we want to add an unhealthy amount of stats for the concerned parent, as well as the supermemo/spaced repetition method for faster, more effective learning.
Right now, the plan is to have a slide (as in slideshow) loop that is within a lesson loop. I am working on a more comprehensive, step-by-step task list.
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
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.
In irb:
>> truth = nil or true
=> true
>> truth
=> nil
>> truth = nil || true
=> true
>> truth
=> true
Here are the thoughts/questions I had while reading chapter 2 of the “Erlang Programming” book:
and and andalso (analogously, or and orelse)? I would like to see examples where the answer is different between the two uses.shell:module_info(). for info about the Erlang shell module.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:
sudo apt-get build-dep erlang to install necessary erlang dependencies. I followed the install instructions that came in the download; for better readability, I used the github page. 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, although I have a few minor usability quibbles (more on those later).
First, a few things I really liked:
Here are the quibbles:
Overall, I’m cautiously happy with NIXTY and I’ve started taking a course. More posts forthcoming…
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 :~)