Skip to content

Instantly share code, notes, and snippets.

4.4.23$ grep -H '.*' x.clj; clojure -e "$(< x.clj)"
x.clj:(import '[java.nio.file Files FileVisitOption Path])
x.clj:(time
x.clj: (-> (Files/walk (Path/of "." (into-array String []))
x.clj: (into-array FileVisitOption []))
x.clj: (.iterator)
x.clj: iterator-seq
x.clj: count))
WARNING: Implicit use of clojure.main with options is deprecated, use -M
java.nio.file.Path
@timvisher
timvisher / # emacs - 2022-04-26_16-31-38.txt
Created April 26, 2022 21:15
emacs on macOS 12.3 - Homebrew build logs
Homebrew build logs for emacs on macOS 12.3
Build date: 2022-04-26 16:31:38
tell application "Google Chrome"
set the clipboard to URL of active tab of front window as text
end tell
tell application "System Events"
--set visible of every process whose visible is true and name is not in {"Finder", name of current application} to false
set visible of every process whose visible is true and name is not "Finder" and frontmost is false to false
end tell
🐗 bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.
🐊 echo $foo
🐚 source <(echo foo=bar)
🐂 echo $foo
--- bash_completion
+++ bash_completion
@@ -1205,6 +1205,39 @@
_known_hosts_real $options "$(_get_cword :)"
} # _known_hosts()
+# Helper function to locate ssh included files in configs
+# This function look for the "Include" keyword in ssh config files and include
+# them recursively adding each result to the config variable
+_included_ssh_config_files()
--tell application "Google Chrome"
-- set front_tab_url to URL of active tab of front window as text
--end tell
-- tell current application to set selection to front_tab_url
tell application "Google Chrome"
set the clipboard to URL of active tab of front window as text
end tell
@timvisher
timvisher / gist:971002
Created May 13, 2011 18:01
image scaler that works on the current selection in Finder.app
tell application "Finder" to set wallpapers to selection
set myDimensions to {w169:[{2560, 1440}, {1920, 1080}, {1366, 768}], w1610:[{2560, 1600}, {1920, 1200}, {1440, 900}, {1280, 800}], f43:[{1600, 1200}], s:[{1024, 1024}]}
tell application "Image Events"
repeat with currentWallpaper in wallpapers
set theWallpaper to open (currentWallpaper as alias)
tell theWallpaper
set theWallpaperDimensions to dimensions of theWallpaper
set theWallpaperAspectRatio to (item 1 of theWallpaperDimensions) / (item 2 of theWallpaperDimensions)
@timvisher
timvisher / gist:787954
Created January 20, 2011 14:25
Script to scale and crop a bunch of wallpapers selected in Finder.app
tell application "Finder" to set wallpapers to selection
tell application "Image Events"
repeat with currentWallpaper in wallpapers
set theWallpaper to open (currentWallpaper as alias)
tell theWallpaper
repeat with dim in [{1920, 1080}, {1280, 800}]
-- Scale and Crop to current dimensions
scale to size (get item 1 of dim)
crop to dimensions dim
🐟 sw_vers; rvm --version; ruby -v; gem list; bundle install
ProductName: Mac OS X
ProductVersion: 10.12
BuildVersion: 16A323
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-darwin16.0]
artifactory (2.5.0)
bigdecimal (1.2.4)
builder (3.2.2)
bundle (0.0.1)