Skip to content

Instantly share code, notes, and snippets.

[
{ "keys": ["alt+s"], "command": "dev_docs_search_selection" },
{ "keys": ["alt+d"], "command":"navigate_to_definition"},
{ "keys": ["alt+a"], "command":"jump_back"},
{ "keys": ["ctrl+alt+d"], "command": "file_diff_menu" },
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser"} },
{ "keys": ["ctrl+shift+."], "command": "erb", "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" }
]
@arathunku
arathunku / shells
Created November 14, 2014 19:29
random
find 10 biggest directories/files
du -a . | sort -n -r | head -n 10
@arathunku
arathunku / GridList.js
Last active August 29, 2015 14:11
Playing with react and fluxxor
var React = require('react');
var Router = require('react-router');
var Fluxxor = require('Fluxxor');
var FluxMixin = Fluxxor.FluxMixin(React);
var StoreWatchMixin = Fluxxor.StoreWatchMixin;
var _ = require('lodash');
var GridListElement = require('./GridListElement');
var flux = require('../flux');
@arathunku
arathunku / NewsfeedStore.js
Last active August 29, 2015 14:12
Request Action, wrapper for all requests
var NewsfeedStore = Fluxxor.createStore({
initialize () {
this.loading = false;
this.error = null;
PaginatedStoreWrapper(this);
_.extend(this, (localStorage.get('NewsfeedStore') || {}));
this.bindActions(
AppBarConstants.REFRESH, this.onRefresh,
def fetch(hash, *keys, &block)
index = 0
keys.reduce(hash) do |coll, key|
index += 1
v = coll[key]
if v
v
else
if !block.nil? && index == keys.size
block.call
(defn- handle-photo-stream [file size]
(let [bytes-stream (:bytes-stream file)
filename (:filename file)]
(if (empty? filename)
{:error "Missing file" :image nil}
(with-open [in bytes-stream]
(with-open [out (java.io.BufferedOutputStream. (java.io.FileOutputStream. (str "/tmp/" filename)))]
(let [buffer (make-array Byte/TYPE 1)]
(loop [g (.read in buffer)
@arathunku
arathunku / shell.sh
Created May 14, 2015 06:38
clean local merged to the head branches
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
@arathunku
arathunku / clojure(script).md
Last active August 29, 2015 14:23
Clojure Beginner's friendly open source projects list
@arathunku
arathunku / .gitignore
Created July 19, 2015 17:07
latex git ignores
words/**/*.acn
words/**/*.acr
words/**/*.alg
words/**/*.aux
words/**/*.backup
words/**/*.bbl
words/**/*.bcf
words/**/*.blg
words/**/*.brf
words/**/*.dvi
(let [plot (histogram (sample-normal 20))
render (-> plot .getPlot .getRenderer)]
(add-histogram plot (sample-normal 20))
; changes color of the outline
(.setSeriesOutlinePaint render 1 java.awt.Color/BLUE)
; does nothing, fill paint remains unchanged. ???????
(.setSeriesFillPaint render 1 java.awt.Color/BLUE)
(view plot))