a/o 2020-05-29
--
- Restart with Cmd-R or Cmd-D
- Erase drive / 3x if second-hand
- Reinstall MacOS
Recently someone asked me for online resources about MRI's internal C source | |
code. Here are a few - if there are more to add please leave a comment! - pat | |
1. Ruby Hacking Guide - The definitive resource for people who want to learn | |
the C programming details of how Ruby works internally. Intended for C hackers. | |
It was just recently translated into English from the original Japanese. | |
http://ruby-hacking-guide.github.io | |
2. Various presentations by Koichi Sasada - he often does public presentations | |
on Ruby internals and they're always fascinating and full of technical details. |
// Nothing here -- never executed. => Why a function then? Is it ever used even as a constructor? If not, a singleton might be what you need.
isPrototypeOf => Why not instanceof?
"Could as well be defined as an interface" => There is this TypeScript thing. You should check it out ;-)
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
<?php | |
namespace app\tests\cases\controllers; | |
use app\controllers\UsersController; | |
use app\models\Users; | |
use lithium\action\Request; | |
use lithium\data\Connections; | |
class UsersControllerTest extends \lithium\test\Integration { |
<?php | |
$remoteFile = file_get_contents('ssh2.sftp://user:[email protected]:22/path/to/file'); | |
// See http://php.net/manual/en/wrappers.ssh2.php for more informations. |
I took the ideas presented here and built a gem called Mustard. Check it out!
There are several expectation/assertion interfaces available for writing tests/specs. Here are some issues I have with them.
assert_equals
feels backwardsassert_equal
(that too)Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.