#Execute as root
stud -f *,443 -b 127.0.0.1,8080 -u myuser -g mygroup --ssl /path/to/cert_and_key.pem
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
import re | |
import unicodedata | |
def slugify(value, separator): | |
""" Slugify a string, to make it URL friendly. """ | |
normalized = unicodedata.normalize('NFKD', value) | |
v = normalized.strip().lower() | |
return re.sub('[%s\s]+' % separator, separator, v) |
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 custom-client | |
(:require [lamina.core :as lamina] | |
[aleph.http.client :as client])) | |
(defn make-connection [request] ;;http-connection is actually private. | |
(assoc request :connection (client/http-connection request))) | |
(defn enqueue-request [{:keys [connection] :as request}] | |
(lamina/run-pipeline connection |
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
(defn sha1-str [s] | |
(->> (-> "sha1" | |
java.security.MessageDigest/getInstance | |
(.digest (.getBytes s))) | |
(map #(.substring | |
(Integer/toString | |
(+ (bit-and % 0xff) 0x100) 16) 1)) | |
(apply str))) |
###Datomic Introduction
###Photos credit
- cover(universe) write_adam "IC443, the Jellyfish nebula" CC BY-NC 2.0 http://www.flickr.com/photos/astroporn/5234588981/
- fact(lens) Raymond Larose "No Crop, No Edit" CC BY-NC-ND 2.0 http://www.flickr.com/photos/lenscrack/5165225746/
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
set daemon 60 | |
set logfile syslog facility log_daemon | |
set idfile /var/.monit.id | |
set statefile /var/.monit.state | |
set mailserver smtp.gmail.com port 587 | |
username "myalert@gmail.com" password "mypassword" | |
using tlsv1 | |
with timeout 30 seconds | |
set alert mymonitor@gmail.com | |
set httpd port 2813 address localhost |
var xhr = new XMLHttpRequest();
// undefined
xhr.open('POST', 'http://localhost:4000/', true);
// undefined
xhr.onreadystatechange = function (a){console.log(a);}
// function (a){console.log(a);}
xhr.send('{"a":"b"}');
// undefined
// XMLHttpRequest cannot load http://localhost:4000/. Origin http://d.hatena.ne.jp is not allowed by Access-Control-Allow-Origin```
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
(defn entity->map [convert-data entity] | |
(reduce (fn [m attr] | |
(if (keyword? attr) | |
(if-let [v (attr entity)] | |
(assoc m attr v) | |
m) | |
(let [[attr conv-fn] attr] | |
(if-let [v (attr entity)] | |
(assoc m attr (conv-fn v)) | |
m)))) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="style.less" rel="stylesheet/less" type="text/css"> | |
<script src="less-1.2.1.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="wrapper" class="webkit-scrollbar-gray"> | |
<div id="main"> | |
hello |
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
a:link { color:#111; text-decoration:none; } | |
a { color:#111; text-decoration:none; } | |
a:visited { color:#828282; text-decoration:none; } | |
@basic-background-color: #fdfdfd; | |
@basic-font-color: black; | |
@subtext-font-color: #828282; | |
@default-font-family: "メイリオ",Meiryo,"Meiryo UI","Segoe UI","ヒラギノ丸ゴ Pro W4",HiraMaruPro-W4,"Hiragino Maru Gothic Pro","ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro",Osaka,"MS Pゴシック","MS PGothic",Merriweather,Verdana,Helvetica,Arial,Sans-Serif; | |
body { |
NewerOlder