This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun sublime-text-2 () | |
(interactive) | |
(color-theme-install | |
'(sublime-text-2 | |
((background-color . "#171717") | |
(background-mode . light) | |
(border-color . "#1a1a1a") | |
(cursor-color . "#fce94f") | |
(foreground-color . "#cfbfad") | |
(mouse-color . "black")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
dir=$(dirname $0) | |
gconfdir=/apps/gnome-terminal/profiles | |
echo # This makes the prompts easier to follow (as do other random echos below) | |
######################## | |
### Select a profile ### | |
######################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn get-square [grid x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in grid [x y]))) | |
(defn init [grid [pos value]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Change `ELISP_DIR` variable as you needed | |
ELISP_DIR="$HOME/.emacs.d/site-lisp" | |
MIRROR="https://lowstz.org/jdee" | |
echo -n "This script require wget and unzip, please ensure that your system has been installed them?[yes/no]:" | |
read choice | |
case $choice in | |
YES|yes|Y|y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns merge_sort.core | |
(:use [clojure.java.io :only (reader)]) | |
(:gen-class :main true)) | |
(defn merj [left right] | |
(loop [[lhead & ltail :as left] left | |
[rhead & rtail :as right] right | |
result []] | |
(cond (nil? left) (concat result right) | |
(nil? right) (concat result left) |