This file contains hidden or 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 authexample.web | |
(:gen-class) | |
(:require [buddy.auth :refer [authenticated? throw-unauthorized]] | |
[buddy.auth.backends.session :refer [session-backend]] | |
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]] | |
[clojure.java.io :as io] | |
[compojure.response :refer [render]] | |
[reitit.ring :as ring] | |
[ring.adapter.jetty :as jetty] | |
[ring.middleware.params :refer [wrap-params]] |
This file contains hidden or 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
# カレントディレクトリ直下のマークダウンのファイルすべてに対して、ファイル名の末尾に '.org' を付与する | |
find ./ -type f -maxdepth 1 -name "*.md" | xargs -I% mv % %.org | |
# 上とまったく逆の操作。 末尾の '.org' を取り除く。 | |
find ./ -type f -maxdepth 1 -name "*.md.ignore" | sed 's/\.ignore$//' | xargs -I% mv %.org % | |
# いったん、ファイル名を退避して、ことが終わったらもとに戻す、とかのときに便利。 |
This file contains hidden or 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 | |
# | |
# (1) copy to: ~/bin/ssh-host-color | |
# (2) set: alias ssh=~/bin/ssh-host-color | |
# | |
# Fork from https://gist.github.com/thomd/956095 | |
set_term_bgcolor(){ | |
local R=$1 | |
local G=$2 |