Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
//random game jam theme generator | |
var LudumDareThemeList = [ | |
"2030: The Year We Make Contact", | |
"3D Glasses", | |
"8 Eyes", | |
"A (very) non-addictive game", | |
"A day in the life of", | |
"Aardvarks", | |
"Abandoned", | |
"Absolute", |
module Base10M | |
(encode | |
,decode) where | |
import Data.List(elemIndex) | |
import Data.Maybe(fromJust) | |
unicodes = ['a'..] | |
numOfUnicodes = toInteger $ length unicodes |
Picking the right architecture = Picking the right battles + Managing trade-offs
(ns viebel.gist-57d9ebad3381e727c2f0a373e1bd4eec.raw.spec-example | |
(:require [cljs.spec :as s])) | |
(s/def ::tag (s/cat :type #{:div} | |
:attrs map? | |
:children (s/spec (s/* ::tag)))) | |
(s/explain ::tag [:div {} [[:div {} []]]]) | |
;; In: [2 0] val: [:div {} []] fails spec: _ at: [:children :type] predicate: #{:div} |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys
and look for sec
, use the key ID for the next stepgit
to use GPG -- replace the key with the one from gpg --list-secret-keys
(ns channel-of.core | |
(:require [clojure.spec :as s] | |
[clojure.core.async :as a] | |
[clojure.core.async.impl.protocols :as ap])) | |
(defmacro chan-of [spec & chan-args] | |
`(let [ch# (a/chan ~@chan-args)] | |
(reify | |
ap/ReadPort | |
(take! [_ fn1-handler#] |
(defn distinct-by | |
"Returns a lazy sequence of the elements of coll, removing duplicates of (f item). | |
Returns a stateful transducer when no collection is provided." | |
{:added "1.0"} | |
([f] | |
(fn [rf] | |
(let [seen (volatile! #{})] | |
(fn | |
([] (rf)) | |
([result] result) |
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name yourdomain | |
ssl_certificate /etc/ssl/localcerts/yourdomain.crt; | |
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key; | |
ssl_ecdh_curve prime256v1; | |
ssl_session_cache builtin:1000 shared:SSL:10m; |