Skip to content

Instantly share code, notes, and snippets.

(ns demo.core
(:require
[reagent.core :as reagent :refer [atom]]
[reagent.session :as session]
[reitit.frontend :as reitit]
[clerk.core :as clerk]
[accountant.core :as accountant]))
;; -------------------------
;; Routes
(ns clojure-app.core
(:require [clojure.spec.alpha :as s]))
(def email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$")
(s/def ::email-type (s/and string? #(re-matches email-regex %)))
(s/def ::acctid int?)
(s/def ::first-name string?)

Keybase proof

I hereby claim:

  • I am papachan on github.
  • I am papachan (https://keybase.io/papachan) on keybase.
  • I have a public key ASCRo1rR-fsgfqH_52qmk9KA-g5xRAGo04YQ_tskBwb18go

To claim this, I am signing this object:

#!/usr/bin/zsh
# A simple script to curl a gitignore file to your git init
printf "Which language?\n:"
read in
git init
lang=`echo $in | sed -e 's/\b\(.\)/\u\1/g'`
@papachan
papachan / core.clj
Last active November 23, 2016 23:09
(ns core
(:use quil.core))
(defn setup []
(smooth) ;;Turn on anti-aliasing
(frame-rate 1) ;;Set framerate to 1 FPS
(background 200)) ;;Set the background colour to
;; a nice shade of grey.
(defn draw []
(stroke (random 255)) ;;Set the stroke colour to a random grey
@papachan
papachan / cshrc
Last active December 28, 2016 20:10
setenv LANG en_US.UTF-8
if ($term == "xterm" || $term == "vt100" \
|| $term == "vt102" || $term !~ "con*") then
# bind keypad keys for console, vt100, vt102, xterm
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "No argument"
exit
fi
echo "Generate $1 project ..."
sbcl --noinform --eval '(ql:quickload :quickproject)' \
--eval "(quickproject:make-project \"$1\")" \
Keybinding Description
C-h C-a help start screen
C-x C-c save-buffers-kill-emacs (exit emacs)
C-g keyboard-quit
M-esc esc keyboard-escape-quit
C-x z Magic. repeat last operation
M-! shell command
ESC ! shell-command
ESC x compile compile ("make -k" is default)
(defproject om-next-demo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:jvm-opts ^:replace ["-Xms512m" "-Xmx512m" "-server"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.122" :classifier "aot"]
;; check OS type
(cond
((string-equal system-type "windows-nt")
(progn
(message "Windows Worst System operative") )
)
((string-equal system-type "darwin")
(progn
(message "Mac OS")
)