Skip to content

Instantly share code, notes, and snippets.

Michel Billard mbillard

Block or report user

Report or block mbillard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:eeab2268b8e4bfd2ad3b
- `0` is `true`
- Everything is an object, even `nil`
- `===`
- different behavior depending on classes, only use/define for `case...when` blocks
- private class methods (http://domon.cc/2013/12/25/private-class-methods-in-ruby/)
- `and` and `or` vs `&&` and `||`
- constants are not constants unless you freeze them
- `5 / 2 # => 2` transform your integers to floats before doing operations
More:
View the_last_question.txt
The Last Question by Isaac Asimov © 1956
The last question was asked for the first time, half in jest, on May 21, 2061, at a time when humanity first stepped into the light. The question came about as a result of a five dollar bet over highballs, and it happened this way:
Alexander Adell and Bertram Lupov were two of the faithful attendants of Multivac. As well as any human beings could, they knew what lay behind the cold, clicking, flashing face -- miles and miles of face -- of that giant computer. They had at least a vague notion of the general plan of relays and circuits that had long since grown past the point where any single human could possibly have a firm grasp of the whole.
Multivac was self-adjusting and self-correcting. It had to be, for nothing human could adjust and correct it quickly enough or even adequately enough -- so Adell and Lupov attended the monstrous giant only lightly and superficially, yet as well as any men could. They fed it data, adjusted questions to its needs and translated t
View original.txt
Vowel qualities in English words
The following is a list of the most common one-syllable words in English, grouped according to what vowels they contain. You will need to memorize the pronunciation of all these words for the final exam. Luckily, in most cases the spelling will help you. I suggest that you create a guide for yourself noting how particular letter combinations are usually pronounced, and which words are exceptions. The words have been arranged in groups according to spelling. (This list is a slightly modified version of one created by John Myhill.)
I have used the following substitutes for phonetic characters (see your handout from the IPA Handbook): [E] for the vowel in 'bed', [I] 'bid', [U] 'good', [A] 'bad', [^] 'bud', [O] 'bought', [3] RP 'bird', [@] for schwa.
Lists
Words pronounced with the near-high near-front vowel [I]:
@mbillard
mbillard / _hot.txt
Created Feb 16, 2014
A comparison of Reddit's previous and new algorithm
View _hot.txt
old new
# score > 0
_hot(1, 0, 1262304000) 2850.0 2850.0
_hot(1, 0, 1353107345) 4868.0 4868.0
_hot(1000, 500, 1262304000) 2852.69897 2852.69897
_hot(1000, 500, 1353107345) 4870.69897 4870.69897
# score < 0
_hot(0, 1, 1262304000) -2851.0 2850.0
_hot(0, 1, 1353107345) -4869.0 4868.0
@mbillard
mbillard / US-fr
Created Mar 27, 2013
List of words that are spelled the same in French and English (special french characters were replaced by their corresponding ascii character). The source files were found here: http://www.winedt.org/Dict/
View US-fr
a
abandon
abandons
abattoir
abattoirs
abbe
abbes
abbesses
abdication
abdications
@mbillard
mbillard / delimiters
Last active Feb 6, 2018
A collection of characters that can be used as delimiters/separators
View delimiters
~ tilde
• &bull;
· &middot;
— em dash
- en dash
« &laquo;
» &raquo;
‹ &lsaquo;
› &rsaquo;
| pipe
@mbillard
mbillard / gist:1647940
Created Jan 20, 2012
How to install GNU gettext on MAC OSX
View gist:1647940
  1. Wget ftp://ftp.gnu.org/pub/gnu/gettext/gettext...t-0.12.1.tar.gz
  2. Untar file as tar -zxvf gettext-0.12.1.tar.gz
  3. cd to the directory containing the package's source code and type ./configure to configure the package for your system. If you're using csh on an old version of System V, you might need to type sh ./configure instead to prevent csh from trying to execute configure itself.

Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

  1. Type make to compile the package.
  2. Optionally, type make check to run any self-tests that come with the package.
  3. Type make install to install the programs and any data files and documentation.
You can’t perform that action at this time.