Skip to content

Instantly share code, notes, and snippets.

@echosa
echosa / Brave-issues.md
Last active September 17, 2024 06:26
Brave browser issues
@echosa
echosa / att.sh
Last active January 28, 2020 02:58
All The Things - Package Manager Manager
#!/bin/bash
PACKAGE_MANAGERS=()
PACKAGE_MANAGERS+=("apt")
apt_clean() {
sudo apt autoremove
}
apt_search() {
apt search $1
@echosa
echosa / gist:1cfbd0e6c46b6509be260f9bbe170c12
Created October 23, 2017 16:51
Blockstack verification
Verifying my Blockstack ID is secured with the address 1LDneyt7jTNqkj9e3jqoT5PyktYNJidHhV
@echosa
echosa / keybase.md
Created May 4, 2017 21:44
keybase.md

Keybase proof

I hereby claim:

  • I am echosa on github.
  • I am echosa (https://keybase.io/echosa) on keybase.
  • I have a public key ASD2jj6mJb0DwaT6czvdBkkuEliXIwDfN8oOBzQa_u8G7Ao

To claim this, I am signing this object:

on findTurntableTab()
set AppleScript's text item delimiters to "/"
set foundTab to "no"
tell application "Google Chrome"
set theWindows to get every window
repeat with theWindow in theWindows
repeat with theTab in every tab in theWindow
set theURL to URL of theTab
set baseURL to text item 3 of theURL
@echosa
echosa / brew --config
Created July 30, 2012 17:17
Mac OS X Homebrew doctor error on par2tbb.rb formula
$ brew --config
HOMEBREW_VERSION: 0.9.2
HEAD: 2814e3a9fa88acf262062a26af15d87dc9f572d6
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.8-x86_64
Xcode: 4.4
CLT: 4.4.0.0.1.1249367152
GCC-4.0: N/A
@echosa
echosa / comp.sh
Created August 30, 2014 18:02
Clojure core.typed comparator
;; Trying to annotate a comparator that sorts a list of namespaces alphabetically
zork-fortress.core=> (clojure.core.typed/cf (comp (t/fn [ns1 :- clojure.lang.Namespace ns2 :- clojure.lang.Namespace] :- t/Num (compare (str ns1) (str ns2)))))
Type Error (/private/var/folders/s1/t0k7x43122ggbclq88zgjl400000gn/T/form-init8319721319789341749.clj:1:24) Polymorphic function comp could not be applied to arguments:
Polymorphic Variables:
x
y
b
Domains:
@echosa
echosa / history-cmd.clj
Last active August 29, 2015 14:04
history command that I can't get to get properly typed
(t/ann ^:no-check history-cmd [t2/Game -> String])
(defn history-cmd
"The history command."
[game]
(str "*** START HISTORY ***"
(w/walk #(str "\n> " (:command %) "\n\n" (:response %) "\n")
#(apply str %)
(if (< (count (:turn-history game)) 4)
(:turn-history game)
(subvec (:turn-history game) (- (count (:turn-history game)) 4))))
@echosa
echosa / trail
Created July 10, 2014 14:25
Delete trailing spaces in Acme
#!/usr/bin/env bash
# Removes trailing spaces from entire window.
# Run as `trail` (no | or < necessary)
# Inspired by:
# http://www.mostlymaths.net/2013/03/extensibility-programming-acme-text-editor.html
echo -n "0,$" | 9p write acme/$winid/addr
9p read acme/$winid/body | sed 's/ *$//g' | 9p write acme/$winid/data
echo -n "0,0" | 9p write acme/$winid/addr
(ann player-character String)
(def player-character
"The character that represents the player."
"@")
(ann find-player
[(IPersistentVector (IPersistentVector Any))
->
(Vector* Number Number)])
(defn find-player