Skip to content

Instantly share code, notes, and snippets.

View aroman's full-sized avatar
👋
hiring!

Avi Romanoff aroman

👋
hiring!
View GitHub Profile
console.log('hi')
@aroman
aroman / gist:9479119
Last active August 29, 2015 13:57
Barrack Class of 2014 Top Facebook Commenters

Rankings by Total Number of Likes

#1 Miranda Davis: 819 likes, 183 comments, 4.48 likes per comment
#2 NotJacob Reich: 802 likes, 251 comments, 3.20 likes per comment
#3 Avi Romanoff: 685 likes, 198 comments, 3.46 likes per comment
#4 Hannah Wischnia: 594 likes, 171 comments, 3.47 likes per comment
#5 Gavi Stein: 541 likes, 160 comments, 3.38 likes per comment
#6 Sophia Elizabeth Shoulson: 465 likes, 259 comments, 1.80 likes per comment
#7 Jesse Bernstein: 452 likes, 100 comments, 4.52 likes per comment

#8 Avi Gordon: 375 likes, 123 comments, 3.05 likes per comment

@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 && sudo mount -t msdos /dev/disk0s1 /Volumes/ESP/)
### 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 / 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

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIIBXG0+RaBz/G29fHyyUtv+gMWGAZ2KQvEHRsA6ZBAsD0cgn/HdVaWGYdf25SgsPc3v/qN+UxJjs83upP0goHo1VYFH9TdIHHLvtrLS2QxBsVhq5L/tOKT9LgChwNjVASlVPW+2yRpVCVA0gNYJQB7LTN76CEe5/4p8QgCIkO0We/P7DYy3LNX3n8Ad1F9K7NlnCQMjp4eH3PE7npFbHLXj1knuQMSAtuMcsjvZKsTqjGslw93zORrYHTFIvvwRpAFE/KxY5qknOFX5gCJaMQc/LlbdfpDtjXNYymB5/JMROm2fGM0IGwQV6X+S8RqNhgUeN82cxqIWNi5Iv9Ataz bumi@omashu
// 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 {
@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
}
@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);
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)