Skip to content

Instantly share code, notes, and snippets.

View meeDamian's full-sized avatar
👨‍💻
Lightning Networking

Damian Mee meeDamian

👨‍💻
Lightning Networking
View GitHub Profile
app.service 'Session', ->
@create: (@sessionId, @userId) ->
@destroy: ->
@id = @userId = null
@
Cryptsy = ->
if Cryptsy::_singletonInstance
return Cryptsy::_singletonInstance
Cryptsy::_singletonInstance = @
@orders = []
http = require 'http'
https = require 'https'
url = require 'url'
querystring = require 'querystring'
class Downloader
constructor: (@url, @method="GET", headers, @params) ->
@headers =
'User-Agent': '*Coin-Monitor'
'Content-Type': "application/x-www-form-urlencoded"
class Order
start: (callback) ->
callback someDataFetchedFromInterwebs
price = NaN
if o.type is "buy"
price = m.lastsellprice
@tmp.list[i].quantity = volume * price
else
price = 1 / m.lastbuyprice
@tmp.list[i].quantity = volume
@tmp.list[i].price = price

Keybase proof

I hereby claim:

  • I am chester1000 on github.
  • I am meedamian (https://keybase.io/meedamian) on keybase.
  • I have a public key whose fingerprint is D8CA 1776 EB92 6549 1D07 CE67 F546 ECBE A809 CB18

To claim this, I am signing this object:

require './module'
@meeDamian
meeDamian / extendCoffeeStyle.coffee
Created July 15, 2014 18:05
Random extend example
class Orange extends Fruit
constructor: ->
console.log 'Orange created'
peel: ->
console.log 'Oh god, that hurts'
orange = new Orange()
orange.peel()
@meeDamian
meeDamian / loop.coffee
Last active August 29, 2015 14:04
change key:value to the list of [key, value]
transformer = (obj) -> [key, val] for own key, val of obj when "_" isnt key.charAt 0
'use strict';
var express = require('express');
var passport = require('passport');
var auth = require('../auth.service');
var router = express.Router();
var LocalStrategy = passport.authenticate('local', function (err, user, info) {
var error = err || info;