This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Message { | |
private HashMap<String, String> fields = new HashMap<>(); | |
public void set(String key, String value) { | |
fields.set(key, value); | |
} | |
public void get(String key) { | |
return fields.get(key); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'project' | |
include Project.DSL | |
define :project do | |
dir :assets do | |
dir :css | |
dir :js | |
dir :images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns necklace-test.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [necklace.adapter.connect :as c] | |
[cljs.core.async :refer [put! chan <!]] | |
[cljs.nodejs :as node] | |
[necklace-test.util :refer [thunk-readdir]])) | |
(defn handler | |
[req] | |
(go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thunkify = require('thunkify'); | |
var read = thunkify(require('fs').readdir); | |
exports.func = function* func() { | |
var v = yield read('.'); | |
return v; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sax = require('sax'), | |
P = require('node-promise').Promise, | |
co = require('co'); | |
var coThunk = function(sax) { | |
return function(fn) { | |
sax.on('opentag', function(n) { fn(null, n); }); | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
for url in $(curl -s http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/rss.xml | recode html..ascii | awk -F "download: <a href= " '{print $2}' | cut -f 1 -d'>'); do wget -c $url; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
cp /etc/pulse/default.pa /etc/pulse/default.pa.original | |
sed -i "s/load\-module module\-role\-cork/\# load\-module module\-role\-cork/" /etc/pulse/default.pa | |
pulseaudio --kill | |
pulseaudio --start | |
echo "Done: Now unmute from 'pavucontrol'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
p = require('readline-sync'), | |
_ = require('underscore'); | |
var text = fs.readFileSync('./categoriebrasile', 'utf-8').split('\n').filter(function(x) { return x !== '' && !~x.indexOf('+'); }); | |
var text2 = fs.readFileSync('./categorieitalia', 'utf-8').split('\n').filter(function(x) { return x !== '' && !~x.indexOf('+') && !~x.indexOf('Casa'); }); | |
console.log(text.length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌(yawnt@ehecatl) (node 0.11.14) | |
╰─(~)> cat .vimrc| grep Plugin | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'bling/vim-airline' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'myhere/vim-nodejs-complete' | |
Plugin 'fsouza/go.vim' | |
Plugin 'mmalecki/vim-node.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] /home/yawnt/code/scala/icarus/src/main/scala/wrappers/System.scala:25: type mismatch; | |
[error] found : R | |
[error] required: BaseReq | |
[error] port.service(req) |
OlderNewer