Skip to content

Instantly share code, notes, and snippets.

View MarcoPolo's full-sized avatar
🌠
Gradatim

Marco Munizaga MarcoPolo

🌠
Gradatim
View GitHub Profile
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
;; User keymap
;; -----------------------------
;; Keymaps are stored as a set of diffs that are merged together together
;; to create the final set of keys. You can modify these diffs to either add
;; or subtract bindings.
;;
;; Like behaviors, keys are bound by tag. When objects with those tags are active
;; the key bindings are live. Keys can be bound to any number of Light Table commands,
;; allowing you the flexibility to execute multiple operations together. To see a list
;; of all the commands you can execute, start typing a word related to the thing you
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
syms omega phi A t
v = A*cos(omega*t+phi);
v1 = subs(v, {A,omega,phi}, {100,120*pi,0});
tn = (0:0.01:1)/60;
subs(v1,t,tn)
%%
% *Part 4*
%
syms wt t ak k
@MarcoPolo
MarcoPolo / Stat.js
Created February 3, 2014 01:47
Simple Javascript Statistics
//
// +-------------------------------------------------+
// | Statistics.js!! |
// |-------------------------------------------------|
// | error fn -> a pretty good approximator |
// | cdf to find the percentile from zScore |
// | p value calculator |
// | |
// +-------------------------------------------------+
//
{:+ {:app {
"pmeta-alt-j" [:dev-inspector]
}}
@MarcoPolo
MarcoPolo / gist:8481413
Created January 17, 2014 21:00
Terminator, soft tango. A soft dark color scheme very loosely based of tango
palette = "#1b1b1b:#ab4642:#a0b56c:#f7ca87:#7cafc2:#ba8baf:#86c1b8:#cfcfcf:#dc9656:#e85f59:#cde88b:#ffe5bd:#91cde3:#e1a8d3:#9ce1d6:#f7f7f7"
@MarcoPolo
MarcoPolo / gist:8461947
Created January 16, 2014 19:42
How to write inline stuff
(cmd/command {:command ::trigger-inline
:desc "triggers lt-tmux inline"
:exec (fn []
(object/raise lt-tmux ::show-inline {:result "stay classy"}) )})
@MarcoPolo
MarcoPolo / gist:8216536
Created January 2, 2014 08:51
SOCKS proxy on a plain connection
(def ^:dynamic *socks-proxy* (InetSocketAddress. "localhost" 8118))
(def PlainSocksSocketFactory
(proxy
[PlainSocketFactory] []
(createSocket [params]
(Socket. (Proxy. Proxy$Type/SOCKS *socks-proxy*)))))
(def reg
(doto
@MarcoPolo
MarcoPolo / deets.md
Last active December 28, 2015 22:49
Cryptic Crypto Details

Cryptic's Crypto Details:

Registration

In-browser

  • The user chooses a username and password
  • A pub/priv key is generated and stored in a structure called the user blob. (A user will have the option to upload their own set of keys too)
  • The user blob also contains a file tree which will store uploaded files (with their encryption key) and folders (for organizing files).
  • The user blob is encrypted with the PBKDF2 hash of the user's password.