Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
require "gnuplot"
require "integration"
def draw_plot
Gnuplot.open do |gp|
Gnuplot::Plot.new( gp ) do |plot|
@t3chnoboy
t3chnoboy / Brews
Created November 8, 2013 19:04
Homebrew packages
packages:
ack
apple-gcc42
atk
autoconf
autojump
automake
bash
@t3chnoboy
t3chnoboy / Extract audio from mp4
Created November 10, 2013 10:05
Extract audio from mp4 using ffmpeg
ffmpeg video.mp4 -i -vn -c:a copy audio.m4a
@t3chnoboy
t3chnoboy / User.coffee
Last active December 28, 2015 14:09
sails generate model User name:string password:string email:email age:number --coffee
# User
#
# @module :: Model
# @description :: A short summary of how this model works and what it represents.
# @docs :: http://sailsjs.org/#!documentation/models
module.exports =
attributes: {
@t3chnoboy
t3chnoboy / User.coffee
Last active December 28, 2015 14:09
sails generate model User --coffee
# User
#
# @module :: Model
# @description :: A short summary of how this model works and what it represents.
# @docs :: http://sailsjs.org/#!documentation/models
module.exports =
attributes: {
@t3chnoboy
t3chnoboy / UserController.coffee
Created November 17, 2013 12:21
sails generate controller User --coffee
# UserController
#
# @module :: Controller
# @description :: A set of functions called `actions`.
#
# Actions contain code telling Sails how to respond to a certain type of request.
# (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL)
#
# You can configure the blueprint URLs which trigger these actions (`config/controllers.js`)
# and/or override them with custom routes (`config/routes.js`)
@t3chnoboy
t3chnoboy / UserController.coffee
Created November 17, 2013 12:24
sails generate controller User comment like create --coffee
# UserController
#
# @module :: Controller
# @description :: A set of functions called `actions`.
#
# Actions contain code telling Sails how to respond to a certain type of request.
# (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL)
#
# You can configure the blueprint URLs which trigger these actions (`config/controllers.js`)
# and/or override them with custom routes (`config/routes.js`)
@t3chnoboy
t3chnoboy / MyAdapterAdapter.coffee
Created November 17, 2013 12:28
sails generate adapter myAdapter --coffee
module.exports = ->
# MyAdapterAdapter
#
# @module :: Adapter
# @description :: A short summary of what this adapter is for and what interfaces it supports.
# @docs :: http://sailsjs.org/#!documentation/adapters
#
# @syncable :: false
@t3chnoboy
t3chnoboy / gist:8322246
Created January 8, 2014 18:55
Convert all files in folder to utf-8 using iconv
# http://stackoverflow.com/questions/4544669/batch-convert-latin-1-files-to-utf-8-using-iconv
find . -type f -exec bash -c 'iconv -f iso-8859-1 -t utf-8 "{}" > /path/to/destination/"{}"' \;
http://watchlist-koa.herokuapp.com/ebay?OPERATION-NAME=findItemsByKeywords&keywords=alien