Skip to content

Instantly share code, notes, and snippets.

View aroman's full-sized avatar
👋
hiring!

Avi Romanoff aroman

👋
hiring!
View GitHub Profile
[_LOG_LEVEL_DEBUG 08:54:29.417854] SearchManager.vala:215: Replace "private" with "public"
[_LOG_LEVEL_INFO 08:54:29.446488] SearchManager.vala:173: 13 occurrences found
[_LOG_LEVEL_DEBUG 08:54:29.851415] SearchManager.vala:215: Replace "private" with "public"
[_LOG_LEVEL_INFO 08:54:29.869035] SearchManager.vala:173: 12 occurrences found
[_LOG_LEVEL_INFO 08:54:30.392455] SearchManager.vala:173: 0 occurrences found
[_LOG_LEVEL_FATAL 08:54:30.611825] [GLib-GObject] g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[_LOG_LEVEL_FATAL 08:54:30.611909] Scratch will not function properly.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5b18297 in g_slice_alloc () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
@aroman
aroman / email.js
Created May 17, 2014 15:15
mocha + async test isolation
module.exports.send = function (template, model, recipient, subject, callback) {
async.waterfall([
function readTemplate (wf_callback) {
fs.readFile(path.join(__dirname, TEMPLATES_DIR, template), wf_callback);
},
function renderTemplate (data, wf_callback) {
wf_callback(null, data.toString());
},
Tue, 13 May 2014 21:03:47 GMT uncaughtException Uncaught, unspecified "error" event.
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at Function.EventEmitter.emit (events.js:74:15)
at _rejected (/Users/sutter/Developer/io/node_modules/kraken-js/node_modules/q/q.js:797:24)
at /Users/sutter/Developer/io/node_modules/kraken-js/node_modules/q/q.js:823:30
at Promise.when (/Users/sutter/Developer/io/node_modules/kraken-js/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/Users/sutter/Developer/io/node_modules/kraken-js/node_modules/q/q.js:741:41)
at /Users/sutter/Developer/io/node_modules/kraken-js/node_modules/q/q.js:557:44
at flush (/Users/sutter/Developer/io/node_modules/kraken-js/node_modules/q/q.js:108:17)
@aroman
aroman / ab.js
Created May 13, 2014 20:58
named closures
// is this...
mongoose.connection.on('error', function onConnectionError(err) { // Closure is named
console.log('Error: Can not connect to DB'.red);
console.log(err.toString().red);
process.exit(1);
});
// ...better than this?
mongoose.connection.on('error', function (err) { // Closure is NOT named
console.log('Error: Can not connect to DB'.red);
@aroman
aroman / wat.js
Last active August 29, 2015 14:00
// Client from MongoDB
{
"_id": {
"$oid": "52ec25f12ebb928c81b4d2c8"
},
"name": "test",
"redirect_uri": "http://localhost:3001/oauth_test",
"trusted": true
}
// dim_windows method copied with animation effects removed, kept dock methods to update dock with first switch
void window_delay() {
var current_actor = current_window.get_compositor_private() as Actor;
var i = counter = 0;
foreach (var clone in window_clones) {
if (current_actor == clone.source) {
set_child_below_sibling(clone, dock_background);
dock.get_child_at_index(i).animate(AnimationMode.LINEAR, 100, opacity: 255);
} else {
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIIBXG0+RaBz/G29fHyyUtv+gMWGAZ2KQvEHRsA6ZBAsD0cgn/HdVaWGYdf25SgsPc3v/qN+UxJjs83upP0goHo1VYFH9TdIHHLvtrLS2QxBsVhq5L/tOKT9LgChwNjVASlVPW+2yRpVCVA0gNYJQB7LTN76CEe5/4p8QgCIkO0We/P7DYy3LNX3n8Ad1F9K7NlnCQMjp4eH3PE7npFbHLXj1knuQMSAtuMcsjvZKsTqjGslw93zORrYHTFIvvwRpAFE/KxY5qknOFX5gCJaMQc/LlbdfpDtjXNYymB5/JMROm2fGM0IGwQV6X+S8RqNhgUeN82cxqIWNi5Iv9Ataz bumi@omashu
@aroman
aroman / rockfactor.md
Last active August 29, 2015 13:57
The Mrs. Rock Factor

Ahhh, I understand. Keeba is not designed to delete assignments once they are deleted from the school website. The reason for this is that many teachers will periodically remove past assignments (e.g. from one month to the next — not talking about from year-to-year) from the website, and a number of students (myself included) like to view all the assignments in a class to prepare for an exam. For example, to prepare for my calculus midterm last week, I clicked “show all assignments” in that course and I could then see all of the assignments I had completed in that course, and I could then review and redo them as practice.

Your situation is of course an interesting and legitimate caveat of Keeba’s current behavior in this regard. Perhaps a good compromise would be that when Keeba sees that an assignment has been deleted by a teacher, if the assignment’s due date has not yet passed (i.e. it is due ‘today’ or at some time in the future), Keeba would then delete the assignment from the students’ page. That would

### Keybase proof
I hereby claim:
* I am aroman on github.
* I am aroman (https://keybase.io/aroman) on keybase.
* I have a public key whose fingerprint is 9368 53CF 4D3C B5E2 9D43 4504 0BD2 1DFA C8C0 A40F
To claim this, I am signing this object:
@aroman
aroman / gist:9576240
Last active August 29, 2015 13:57
elementary OS Isis on a Mac

elementary OS Isis on a Mac

NOTE: I'm making a few assumptions about the way your computer is set up. Namely:

  • Your ESP partition is located at disk0s1
  1. Download refind http://www.rodsbooks.com/refind/getting.html
  2. Run install.sh --esp
  3. Mount your ESP partition (mkdir /Volumes/ESP &amp;&amp; sudo mount -t msdos /dev/disk0s1 /Volumes/ESP/)