Skip to content

Instantly share code, notes, and snippets.

View practicalli-johnny's full-sized avatar
😺
Software Engineering education and advocacy with a focus on Clojure

Practicalli Johnny practicalli-johnny

😺
Software Engineering education and advocacy with a focus on Clojure
View GitHub Profile
@practicalli-johnny
practicalli-johnny / hello-world.clj
Created February 12, 2012 23:27
HelloWorld in Clojure
(def hello-world [name]
(println (str "Hello " name ", welcome to the world of Clojure")))
@practicalli-johnny
practicalli-johnny / gist:2037502
Last active April 6, 2016 17:39 — forked from jennifersmith/gist:1968416
Ldnclj dojo - Palindrome detector
(ns clojuredojo.core)
(defn palindrome-detector [thing] (= (reverse thing) (seq thing)) )
(def __ palindrome-detector)
(false? (__ '(1 2 3 4 5)))
(true? (__ "racecar"))
(true? (__ [:foo :bar :foo]))
(true? (__ '(1 1 3 3 1 1)))
@practicalli-johnny
practicalli-johnny / clojure-init.el
Created April 12, 2012 10:13
Autoloading Clojure configuration for Emacs 24 - Basic
;; @jr0cket - communiy developer > http://blog.jr0cket.co.uk/
;; Lightweight clojure setup for Emacs
;; requires emacs24 and leiningen
;; Add Marmalade package archive for Emacs starter kit and other Emacs packages
(require 'package)
(add-to-list 'package-archives
@practicalli-johnny
practicalli-johnny / blogger-github-gists-template.js
Created April 12, 2012 10:37
Blogger template for Github Gists
<!-- JavaScript for including Github gists into your posts
<div class="gistLoad" data-id="GistID" id="gist-GistID">Loading ....</div>
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
-->
@practicalli-johnny
practicalli-johnny / jax-git-workshop.md
Last active October 11, 2015 17:18 — forked from tlberglund/jax-git-workshop.md
JAX London Git Workshop Notes

JAX Git Workshop

Outline

  • git init project
  • git config --global user.name "Tim Berglund"
  • git config --global user.email "tlberglund@github.com"
  • git status
  • git add <file>
  • Diff
    • git diff
@practicalli-johnny
practicalli-johnny / .gitconfig-pretty-commit-graph
Last active December 11, 2015 19:29
Git configuration for visualising git log and the commit graph
[alias]
lol = log --pretty=oneline --abbrev-commit --graph
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
lgl = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
@practicalli-johnny
practicalli-johnny / git-loglive
Last active April 6, 2016 17:47 — forked from tlberglund/git-loglive
Git log monitor script
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
sleep 1
done
@practicalli-johnny
practicalli-johnny / heroku-api-curl-create-simple.sh
Created July 17, 2013 12:26
A simple cURL call that creates an application on Heroku. The command used the -n option that reads the ~/.netrc file that contains login credentials created when you run heroku login using the Heroku toolbelt.
curl -n -X POST https://api.heroku.com/apps -H "Accept: application/vnd.heroku+json; version=3"
@practicalli-johnny
practicalli-johnny / blogger-and-gistLoader-to-show-github-gitst.html
Created July 17, 2013 12:42
Adding Gits to articles on blogger using the gistLoader javascript library
<!--
1. Create your Gist on Github and copy the number, the last part of the gist URL
2. Add the Gist number as the data-id in the gistLoad call to the gistLoader library
-->
<!-- Add a specific gist from Github -->
<div class="gistLoad" data-id="change-to-gist-number" id="gist-GistID">
Loading Gist from Github ....</div>
@practicalli-johnny
practicalli-johnny / octopress-gist-example
Last active August 29, 2015 13:57
Using the Gist directive in Octopress
## Gist Syntax for Octopress
{% gist gist_id [filename] %}
## Example Gist in Octopress
{% gist 9532424 %}