Skip to content

Instantly share code, notes, and snippets.

View ludalex's full-sized avatar

Luca D'Alessandro ludalex

View GitHub Profile
### Keybase proof
I hereby claim:
* I am ludalex on github.
* I am ludalex (https://keybase.io/ludalex) on keybase.
* I have a public key ASAbQBy5M4t6LsLr2lKJX2LFGDiLNps8KUux4XZhOgcQSAo
To claim this, I am signing this object:
@ludalex
ludalex / controllers.application.js
Last active April 4, 2016 22:45
filter hasMany relationship
import Ember from 'ember';
export default Ember.Controller.extend({
filteredModel: Ember.computed('model.[]', 'searchQuery', function() {
let searchQuery = this.get('searchQuery');
if(searchQuery) {
var promises = this.get('model').map( (entity) => {
return Ember.RSVP.hash({

Requirements

  1. USB Overdrive
  2. A non-Apple keyboard with media keys (or keys you want to make "media" keys). For reference, I'm using a Microsoft Sidewinder X4

Set Up

  1. Plug in your keyboard and install USB Overdrive.
  2. Open USB Overdrive. Click into the Settings tab.
  3. Click the dropdown and select "Any Keyboard, Any Application"
@ludalex
ludalex / GiveAwayNotifier.py
Created October 30, 2013 21:53
Small growl+pushalot notifier for detecting when a user on reedit posts an Hearthstone giveaway thread. Can apply to any thread if you change URL to check and keywords to detect. Works only on OSX.
# -*- coding: utf-8 -*-
import feedparser
import logging
logging.basicConfig(level=logging.ERROR)
import gntp.notifier
import time
from httplib import HTTPSConnection
from urllib import urlencode
def Honk(title, body):