Skip to content

Instantly share code, notes, and snippets.

View edgargoncalves's full-sized avatar

Edgar Gonçalves edgargoncalves

  • https://www.businessdatapartners.com/
  • United Kingdom
View GitHub Profile
;; Use of clojure-find-package suggested by Jürgen Hötzel
(defun slime-update-clojure-namespace (arg)
"Find the namespace in the current buffer and use SLIME's REPL
to switch to it, updating the namespace for all buffers.
Using an universal prefix will ask for the name of the namespace.
The actual namespace switch is done by calling `SLIME-REPL-SET-PACKAGE'."
(interactive "P")
(if arg
(call-interactively 'slime-repl-set-package)
(let ((ns (clojure-find-package))) ;; find the (in-ns ...) ns string
(defun slime-redirect-inferior-output (&optional noerror)
"Redirect output of the inferior-process to the REPL buffer."
(interactive)
(let ((proc (slime-inferior-process)))
(cond (proc
(let ((filter (slime-rcurry #'slime-inferior-output-filter
(slime-current-connection))))
(set-process-filter proc filter)))
(noerror)
(t ;; (error "No inferior lisp process")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; prepare our namespaces to the build-script:
(ns leiningen.deploy
(use [lancet :only [ant exec]] ; add other needed ant tasks here
[leiningen.uberjar :only [uberjar]] ; add other lein commands here
[leiningen.core :only [project]])) ; just so that we may call cmds
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; helper fns:
@edgargoncalves
edgargoncalves / groovesharkvideos.js
Created December 8, 2010 20:35
Userscript to search for videoclips of the currently playing song on youtube, on 'v' keypress
// ==UserScript==
// @name Grooveshark Videoclip lookup
// @namespace http://sites.google.com/site/edgargoncalves/
// @description Searches for videoclips of the currently playing song on youtube, on 'v' keypress
// @include http://listen.grooveshark.com/*
// ==/UserScript==
function getNowPlaying(e){
if (e.which === 86) { // 'v'
var row = $("#playerDetails_nowPlaying");
@edgargoncalves
edgargoncalves / gist:cd8c39dc9f5c05761bb4649691c3471d
Created February 20, 2021 11:53
darktable on BigSur - command line output
(base) ➜ ~ rm -rf .cache/darktable
(base) ➜ ~ rm -rf .cache/
(base) ➜ ~ brew install darktable
==> Downloading https://github.com/darktable-org/darktable/releases/download/release-3.4.1/darktable-3.4.1.dmg
Already downloaded: /Users/eemg/Library/Caches/Homebrew/downloads/32125799dceb00bee68724f51cd38ecc10559f0674c904980d69e66ca88a66a3--darktable-3.4.1.dmg
==> Installing Cask darktable
==> Moving App 'darktable.app' to '/Applications/darktable.app'
🍺 darktable was successfully installed!
(base) ➜ ~ /Applications/darktable.app/Contents/MacOS/darktable -d all
// Source code for Buxfer transaction posting with Ubiquity commands.
// By Edgar Gonçalves.
// Version 0.5
// Sun Jun 28 2009.
// Changes in 0.5: Parser2-ready, now.
// Roles, different syntax, selection is supported.
// Multiple suggestions bug fixed.
// Changes in 0.4: Redone command syntax. Now: "BUXFER-SPEND 43.2 IN something". Removed twixfer.
// Changes in 0.3: internal fixes, global variables unified into a single one, to avoid name clashes.