Compile with:
webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.js
Use with the following index.html
(ns calc.core) | |
(def start (biginteger 1)) | |
(def b (.pow (biginteger 2) 20)) | |
(def g (biginteger 11717829880366207009516117596335367088558084999998952205599979459063929499736583746670572176471460312928594829675428279466566527115212748467589894601965568)) | |
(def p (biginteger 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084171)) | |
(def h (biginteger 3239475104050450443565264378728065788649097520952449527834792452971981976143292558073856937958553180532878928001494706097394108577585732452307673444020333)) | |
(defn build-left-table [start end p h g] | |
(into {} |
For me the toughest part of learning Clojure for me has been the switch to functional style thinking. Probably took me 6 months of doing Clojure in my spare time. I’ve used quite a few languages but all of them were mostly object oriented. You basically have to throw a lot of stuff you know out of the window and start from scratch. Clojure is probably far easier to learn for someone who doesn’t have an object oriented background. | |
The things I remember most when learning Clojure: | |
- forcing myself to use higher order functions instead of using a loop whenever possible. Coming from an imperative style you have to force yourself to think differently about problems | |
- brushing up on recursion. You use it all the time in functional programming | |
- being amazed at how little mutable state you actually need. We have a piece of Clojure software in production that contains no mutable state at all | |
- how handy lazy evaluation is. Creating infinite sequences is so much easier to reason about. No need to worry about how man |
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
send_escape = false | |
last_mods = {} | |
control_key_handler = function() | |
send_escape = false | |
end | |
control_key_timer = hs.timer.delayed.new(0.15, control_key_handler) | |
control_handler = function(evt) |
Compile with:
webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.js
Use with the following index.html
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |
I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:
Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.
{ | |
"title": "Shift -> Parens", | |
"rules": [ | |
{ | |
"description": "map left shift to opening parenthesis", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift", |
Operator Mono w/ Italics on OSX Vim
So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.
Now tmux has a concept of window-group
and session
and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.
This is the default case if you simply use the tmux
command as your login shell, effectively creating a new group of windows every time you start tmux
.
This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro