Skip to content

Instantly share code, notes, and snippets.

@alandipert
alandipert / kahn.clj
Last active June 24, 2023 17:59
Kahn's topological sort in Clojure
;; Copyright (c) Alan Dipert. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns alandipert.kahn
(:require [clojure.set :refer [difference union intersection]]))
@jamesmacaulay
jamesmacaulay / rietveld.upload.py.open_url.diff
Created January 27, 2011 16:34
rietveld code review upload.py patch to open issue in browser after upload
--- codereview
+++ (clipboard)
@@ -1665,6 +1665,12 @@
vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files)
if options.send_mail:
rpc_server.Send("/" + issue + "/mail", payload="")
+
+ if response_body.startswith("Issue created.") or\
+ response_body.startswith("Issue updated."):
+ url = msg[msg.rfind("http"):]
# git-freeze: take the current index and working tree state and "freeze" them
# by creating a commit for each as necessary
#
# git-thaw: look for commits created by git-freeze and restore them to
# working tree or index as appropriate
# alias gf='git-freeze'
# alias gt='git-thaw'
function git-freeze () {