Skip to content

Instantly share code, notes, and snippets.


Nick Dima nickdima

  • musiXmatch
  • Bologna, Italy
View GitHub Profile
nickdima / imdb.json
Created Feb 9, 2014
Skrap output example
View imdb.json
"movies": [
"title": "Spider-Man",
"year": "2002",
"poster": ",0,32,44_.jpg"
"title": "The Amazing Spider-Man 2",
"year": "2014",
View gist:6b809342d69c3a250d9a
render = (pageName, action, args, tokens) ->
_render = require './render'
req = require './pages/' + pageName + '.cjsx'
if not isServer
req (page) -> _render page, action, args, tokens
page = req
_render page, action, args, tokens
nickdima / component.cjsx
Created Jul 13, 2015
Component Definition
View component.cjsx
class Component extends React.Component
name: React.PropTypes.string
name: 'Nick'
disabled: false
View gist:103c4bf7254e26547b4a

Component Definition

class Comp extends React.Component
name: React.PropTypes.string
nickdima /
Created Sep 23, 2015
Express + Webpack Dev Server
if process.env.NODE_ENV is 'development'
app.all /(^\/(js|css)\/(.+))|(hot-update\.(.+)$)/, (req, res, next) ->
url = 'http://localhost:3001' + req.originalUrl
callback = (error, response, body) =>
if body?
res.writeHead response.statusCode, response.headers
request(url, callback)
View syncatore_events.js
// Event that triggers as soon as the user syncs the first line.
// It will send the id of the track (subtitle).'onSyncStarted', function(id) {});
// Event that triggers as soon as the user has finished syncing all the lines and reached the last line.
// The data object sent has two properties: id and lyrics (the JSON object of the synced lyrics)'onSyncFinished', function(data) {});
View gist:1779508
javascript: function setCookie(c_name,value,exdays){var exdate=new Date();exdate.setDate(exdate.getDate()+exdays);var c_value=escape(value)+((exdays==null)?"":"; expires="+exdate.toUTCString());document.cookie=c_name+"="+c_value}setCookie('x-mxm-backend','i-1aa4f477',1);setCookie('x-mxm-bypass-webcache','1',1);
nickdima / dabblet.css
Created Apr 22, 2012
Lights Lyrics Card
View dabblet.css
* Lights Lyrics Card
@import url(|Oleo+Script|Audiowide&subset=latin,latin-ext);
p.retro {
font-family: 'Codystar', cursive;
font-size: 3em;
line-height: 1.7em;
View gist:2584408
"metadata": {
"video_id": 40424,
"video_title": "Making Mirrors",
"video_artist": "Gotye",
"video_identifier": "rJOsjP33nF4",
"video_source": "1",
"video_url": "",
"subtitle_id": 11850,
"lyrics_id": 6471529,
View gist:2584415
"metadata": {
"track_id": 15953431,
"track_mbid": "29e201c3-5ca0-4391-a0a1-9ccd91722701",
"track_length": 61,
"lyrics_id": 7173301,
"instrumental": 0,
"subtitle_id": 28358,
"track_name": "Making Mirrors",
"track_rating": 100,