The first thing to do is to install Git on the remote server.
Once you do that the rest of the process is split into three sections:
- Server set-up
- Local set-up (push commits)
- Server (pull commits)
;; (require '[clojure.string :as str] '[clojure.java.shell :as shell] '[taoensso.timbre :as timbre]) | |
(defn with-free-port! | |
"Attempts to kill any current port-binding process, then repeatedly executes | |
nullary `bind-port!-fn` (which must return logical true on successful | |
binding). Returns the function's result when successful, else throws an | |
exception. *nix only. | |
This idea courtesy of Feng Shen, Ref. http://goo.gl/kEolu." | |
[port bind-port!-fn & {:keys [max-attempts sleep-ms] |
# Gandi subdomain DNS configuration for Mailgun validation | |
# - Add the SPF record as TXT and SPF | |
# - Suffix the DKIM record and `email` CNAME with the subdomain | |
# ex: `mg.domain.com` | |
mg 10800 IN CNAME mailgun.org. | |
@ 10800 IN SPF "v=spf1 include:mailgun.org ~all" | |
@ 10800 IN TXT "v=spf1 include:mailgun.org ~all" | |
mailo._domainkey.mg 10800 IN TXT "k=rsa; p=MIG...QAB" | |
email.mg 10800 IN CNAME mailgun.org. | |
@ 10800 IN MX 10 mxa.mailgun.org. |
;; Credits: | |
;; | |
;; * ClojureScript | |
;; * Reagent https://reagent-project.github.io/ | |
;; * Figwheel https://github.com/bhauman/lein-figwheel | |
;; * core.async https://clojure.github.io/core.async/ | |
;; * Christophe Grand's Life implementation http://clj-me.cgrand.net/2011/08/19/conways-game-of-life/ | |
(ns life.core | |
(:require [reagent.core :as r] |
#! /usr/bin/env bash | |
# Get xv6 working with OSX Yosemite | |
# Most things were here: https://doesnotscale.com/compiling-xv6-on-os-x-10-9/ | |
# You need homebrew installed to make this thing work | |
brew tap homebrew/versions && brew install gcc48 | |
brew deps qemu | xargs brew install | |
export PATH=/usr/local/bin:$PATH | |
export CC=/usr/local/bin/gcc-4.8 | |
brew install wget |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"strings" | |
) | |
var ( | |
stream = ` |
Rich Hickey on becoming a better developer | |
− | |
Avatar | |
Rich Hickey • 3 years ago | |
Sorry, I have to disagree with the entire premise here. | |
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero. | |
Mastery comes from a combination of at least several of the following: |
$tail -100f /var/log/applications/application.log | awk ' | |
/INFO/ {print "\033[32m" $0 "\033[39m"} | |
/Exception/ {print "\033[31m" $0 "\033[39m"} | |
' |
# download | |
wget http://downloads.datomic.com/0.8.3848/datomic-pro-0.8.3848.zip | |
unzip datomic-pro-X.X.zip & cd datomic-pro-X.X | |
# install as a maven artifact | |
./bin/maven-install | |
# configure transactor.properties | |
cp config/samples/sql-transactor-template.properties transactor.properties | |
# protocol=sql |
;; from leiningen, use [dorothy/dorothy "0.0.3"] | |
(require '[dorothy.core :as dot]) | |
;; dataflow copied from chat | |
;; https://github.com/pedestal/samples/blob/master/chat/chat-client/app/src/chat_client/behavior.clj | |
(def dataflow '{:transform | |
{:outbound {:init {} :fn outbound-transform} | |
:inbound {:init {} :fn inbound-transform} | |
:nickname {:init nil :fn nickname-transform}} | |
:effect {:outbound send-message-to-server} |