Skip to content

Instantly share code, notes, and snippets.

@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@mfikes
mfikes / README.md
Last active February 24, 2024 13:43
Playing with BigInt in ClojureScript

Usage

Fire up a REPL using any of the following forms.

Node

clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:git/url "https://github.com/mfikes/clojurescript" :sha "ed1e7373a9ecd8b52084dc438e6c21d23dba47ca"}}}' -m cljs.main -re node
@philandstuff
philandstuff / euroclojure2014.org
Last active February 19, 2024 05:12
Euroclojure 2014

EuroClojure 2014, Krakow

Fergal Byrne, Clortex: Machine Intelligence based on Jeff Hawkins’ HTM Theory

  • @fergbyrne
  • HTM = Hierarchical Temporal Memory
  • Slides

big data

  • big data is like teenage sex
    • noone knows how to do it
    • everyone thinks everyone else is doing it
@swannodette
swannodette / gist:3217582
Created July 31, 2012 14:52
sudoku_compact.clj
;; based on core.logic 0.8-alpha2 or core.logic master branch
(ns sudoku
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defn get-square [rows x y]
(for [x (range x (+ x 3))
y (range y (+ y 3))]
(get-in rows [x y])))
@bihe
bihe / init.d play
Created September 25, 2011 18:16
init.d script to launch Play framework under Ubuntu
#!/bin/sh
### BEGIN INIT INFO
## END INIT INFO
# Path to play install folder
PLAY_HOME=/usr/share/play
PLAY=$PLAY_HOME/play
# Path to the JVM
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk

Getting Started with Clojure on Windows

Clojure is an amazingly powerful language. Using it (and watching Rich Hickey videos) has changed the way I think about programming, and the way I code in general. Once I learned the basics of the language, which was a relatively quick process, I fell in love and couldn't look back. I hope this post can help others who are new to Clojure get up and running quickly and painlessly.

This post is opinionated in the sense that I'll suggest certain tools to help those who are new to this scene get on their feet. The things you'll need are:

  • Leiningen (pronounced LINE-ing-en) - This is like a package manager, build tool, task manager, and more in one tool. Think npm or nuget, but with more capabilities. There is at least one other build tool for Clojure (boot), but Leiningen is the most widely used.
  • JDK - Clojure runs on Java. Throw out any qualms you may have about Java, we aren't coding in Java (though we can through Clojure, and sometimes tha
@ftrain
ftrain / rhymes.clj
Last active July 14, 2023 22:20
Annotated rhyming dictionary
;; This is at: https://gist.github.com/8655399
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up
;; this code here:
;;
;; https://gist.github.com/jackrusher/8640437
;;
;; I'm going to study this code and learn as I go.
;;
;; First I put it in a namespace.
@leon
leon / play.conf
Created March 26, 2012 12:27
Upstart script for Play Framework 2.0
# Upstart script for a play application that binds to an unprivileged user.
# put this into a file like /etc/init/play.conf
#
# This could be the foundation for pushing play apps to the server using something like git-deploy
# By calling service play stop in the restart command and play-start in the restart command.
#
# Usage:
# start play
# stop play
# restart play

The project can be built using Lumo

npm install -g lumo-cljs
lumo build.cljs