Find it here: https://github.com/bitemyapp/learnhaskell
This file contains hidden or 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
| { | |
| /* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
| * | |
| * This is a pretty good set, especially considering that many emacs bindings | |
| * such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
| * perhaps a few more, are already built into the system. | |
| * | |
| * BEWARE: | |
| * This file uses the Option key as a meta key. This has the side-effect | |
| * of overriding Mac OS keybindings for the option key, which generally |
This file contains hidden or 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
| ;;; Seed Dependencies for Clojure Projects | |
| ;; This file contains Leiningen-style dependencies for many | |
| ;; commonly-used Clojure and Java libraries. | |
| ;; If you put all of these dependencies in a project.clj file, you | |
| ;; will NOT get a working project! However, running `lein deps` will | |
| ;; download all of these libraries as well as their transitive | |
| ;; dependencies. This is a convenient way to "seed" the local Maven | |
| ;; repository cache on a new machine. |
This file contains hidden or 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 my-cljs.macros.debug | |
| (:require [cljs.analyzer :as cljs] | |
| clojure.walk)) | |
| (declare ap | |
| cljs-macroexpand* | |
| cljs-macroexpand-1* | |
| cljs-macroexpand-all* | |
| cljs-macroexpand |
I recently had the following problem:
- From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
- That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
This file contains hidden or 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
| (time | |
| (def data-thread | |
| (let [c (chan) | |
| res (atom [])] | |
| ;; fetch em all | |
| (doseq [i (range 10 100)] | |
| (thread (>!! c (blocking-get (format "http://fssnip.net/%d" i))))) | |
| ;; gather results | |
| (doseq [_ (range 10 100)] | |
| (swap! res conj (<!! c))) |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
This file contains hidden or 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
| // nodewar.com library function… | |
| // o.lib.targeting.simpleTarget(ship, pos) | |
| // | |
| // mostly deobfuscated/deminified | |
| // | |
| function simpleTarget(ship, pos) { | |
| var i, r, h, | |
| torque = 0, | |
| thrust = 0, | |
| dir = o.lib.targeting.dir(ship, pos); |
This file contains hidden or 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
| Check out README.md to get started editing Clojure with Emacs. |
This file contains hidden or 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 'nokogiri' | |
| # Public: Find the absolute path to a file | |
| # | |
| # This method finds a file that is relative to the | |
| # location of the script, expanding anything that | |
| # needs expanding (~, etc.) | |
| # | |
| # filename - the filename to find |