"Clojure running on Raspberry Pi" sounded so cool that I just had to give it a try.
- Download ARM JDK from Oracle and instlal on Raspberry Pi
- Change visudo to contain the following
(ns racehub.om.facebook | |
(:require [cljs.core.async :as a] | |
[racehub.schema :as rs] | |
[schema.core :as s :include-macros true])) | |
;; ## Utilities | |
(defn prune | |
"Takes a mapping of keys -> new key names and a map and returns a | |
map with nils removed and keys swapped where they're present in the |
#include <QApplication> | |
#include <QStringList> | |
#include <QListWidget> | |
#include <QRadioButton> | |
int main(int argc, char *argv[]) | |
{ | |
QApplication app(argc, argv); | |
QListWidget *listWidget = new QListWidget(); |
#include <glib.h> | |
#include <gio/gio.h> | |
#include <string.h> | |
static GMainLoop *gMainLoop = NULL; | |
char * | |
decode (GFileMonitorEvent ev) | |
{ | |
char *fmt = g_malloc0 (1024); |
These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).
First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter
(2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.
Finally all remaining files are listed using git ls
, the files to keep are removed from that using grep -v
and the resulting list is passed to git rm
which is invoked by git filter-branch --index-filter
(3.). A bit convoluted but it does the trick.
{ "height":15, | |
"layers":[ | |
{ | |
"data":[79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 28, 60, 61, 62, 30, 95, 96, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 28, 76, 77, 78, 30, 79, 80, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 28, 76, 15, 78, 30, 95, 96, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 28, 76, 16, 78, 30, 79, 80, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 28, 76, 31, 78, 30, 95, 96, 95, 96, 79, 80, 95, 156, 157, 158, 95, 96, 79, 80, 95, 28, 76, 32, 78, 112, 13, 13, 79, 80, 95, 96, 79, 172, 173, 144, 158, 80, 95, 96, 79, 28, 76, 47, 48, 61, 61, 62, 95, 96, 79, 80, 156, 143, 138, 160, 190, 96, 12, 13, 13, 111, 76, 16, 15, 16, 31, 78, 13, 13, 14, 96, 172, 138, 173, 174, 79, 80, 44, 45, 45, 127, 92, 93, 93, 93, 93, 94, 109, 110, 30, 80, 188, 189, 189, 190, 95, 96, 79, 80, 95, 44, 45, 45, 45, 45, 45, 45, 141, 142, 30, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 45, 45, 46, 80, 95, 96, 79, 80, 95, 96, 79, 80, 95, 96, 79, 80, |
# CircleCI failed to build a git submodule update step. | |
# Tracked it down to partially complete .git/modules existing in our source cache. | |
# This removes the .git/modules directory before the submodule update. | |
# The error: | |
# $ git submodule update --init | |
# git submodule update --init returned exit code 128 | |
# fatal: Not a git repository: ../.git/modules/<project> Action failed: git submodule update --init | |
checkout: |
ClojureScript does not have a standalone macro system. To write ClojureScript macros, one must write them in Clojure and then refer to them in ClojureScript code. This situation is workable, but at a minimum it forces one to keep ClojureScript code and the macros it invokes in separate files. I miss the locality of regular Clojure macros, so I wrote something called maptemplate
that gives me back some of what I miss. The technique may be useful in other scenarios.
Suppose you're wrapping functionality in another namespace or package so that you can have your own namespace of identically named but otherwise decorated functions:
ClojureScript: