Skip to content

Instantly share code, notes, and snippets.

@t3chnoboy
t3chnoboy / gist:9859920
Created March 29, 2014 18:35
Haskell unicode symbols
( (∈), (∋), (∉), (∌)
, (∅)
, (∪), (∖), (∆), (∩)
{-|
(∈) = 'member'
U+2208, ELEMENT OF
-}
@t3chnoboy
t3chnoboy / gist:9859668
Last active August 29, 2015 13:57
Allow XSS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security
http = require 'http'
http.get 'http://www.lostfilm.tv', (resp) ->
htmlString = ''
resp.on 'data', (chunk) -> htmlString += chunk
resp.on 'end', ->
titleRegex = /<span class="torrent_title"><b>.+\((.+)\)<\/b><\/span>/g
while results = titleRegex.exec htmlString
console.log results[1].replace '<wbr>', ''
{
"findItemsByKeywordsResponse":[
{
"ack":[
"Success"
],
"version":[
"1.12.0"
],
"timestamp":[
http://watchlist-koa.herokuapp.com/ebay?OPERATION-NAME=findItemsByKeywords&keywords=alien
@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/"{}"' \;
@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 / 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 / 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 / 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: {