Skip to content

Instantly share code, notes, and snippets.

View bwagner's full-sized avatar

Bernhard Wagner bwagner

  • Zürich
  • LinkedIn in/bernhardw
View GitHub Profile
-- Adapted from http://www.macosxhints.com/article.php?story=20031018154841400
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Sharing" of menu "View" of menu bar 1
delay 2
@bwagner
bwagner / gist:4064916
Created November 13, 2012 09:42
mp3splt failed to build on 10.7.5
HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install mp3splt
==> Downloading http://downloads.sourceforge.net/project/mp3splt/mp3splt/2.4.2/mp3splt-2.4.2.tar.gz
Already downloaded: /Users/bwagner/Library/Caches/Homebrew/mp3splt-2.4.2.tar.gz
/usr/bin/tar xf /Users/bwagner/Library/Caches/Homebrew/mp3splt-2.4.2.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/mp3splt/2.4.2
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/mp3splt/2.4.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
@bwagner
bwagner / extract_CFBundleIdentifier_from applications_Info_plist.xpath
Last active December 29, 2015 02:09
OSX: xpath to extract CFBundleIdentifier from application's Info.plist
string(//key[. = "CFBundleIdentifier"]/following-sibling::string)
Tue Oct 27 14:07:07 +0100 2015
sh
bootstrap.sh
--sandbox
Using gcc for C compiler. If this is not what you want, set CC.
Using /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin11/4.2.1/collect2 instead.
Bootstrapping in sandbox at '/private/tmp/cabal-install20151027-86053-jbnacc/cabal-install-1.22.6.0/.cabal-sandbox'.
Checking installed packages for ghc-7.10.2...
@bwagner
bwagner / gist:1bd401988d5c114fb458
Created December 7, 2015 09:57
brew home racket
brew home racket
Error: compile error
/usr/local/Library/Formula/racket.rb:42: syntax error, unexpected ')'
/usr/local/Library/Formula/racket.rb:46: syntax error, unexpected ')'
/usr/local/Library/Formula/racket.rb:75: syntax error, unexpected $end, expecting kEND
Please report this bug:
https://git.io/brew-troubleshooting
/usr/local/Library/Formula/racket.rb:75:in `load_formula'
/usr/local/Library/Homebrew/formulary.rb:34:in `load_formula_from_path'
/usr/local/Library/Homebrew/formulary.rb:83:in `load_file'
@bwagner
bwagner / # graphviz - 2016-12-25_09-54-05.txt
Created December 25, 2016 09:03
graphviz on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for graphviz on macOS 10.11.6
Build date: 2016-12-25 09:54:05
@bwagner
bwagner / clip_magic.py
Last active August 5, 2023 10:22 — forked from cphyc/clip_magic.py
copy to clipboard ipython magic
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
updated version: https://gist.github.com/bwagner/270da7c7d31af7ffaca32674557fc172
Example usage:
@bwagner
bwagner / tmux_repl.sh
Last active October 12, 2019 10:57
REPL below vi, ability to send paragraph from vi to REPL in languages: Python, Perl, JavaScript, Bash
#!/bin/bash
prg=`basename $0`
if [ $# -eq 0 ]; then
echo "Usage: $prg <script>"
exit
else
echo "args $1"
fi
{"name":"log","hostname":"C46L37WS1065","pid":3120,"level":30,"msg":"app ready","time":"2020-06-25T12:46:24.482Z","v":0}
{"name":"log","hostname":"C43L37WS1065","pid":3120,"level":30,"msg":"starting version 1.34.2","time":"2020-06-25T12:46:24.482Z","v":0}
{"name":"log","hostname":"C43L37WS1065","pid":3120,"level":30,"msg":"updateSchema:\n Current user_version: 20;\n Most recent db schema: 20;\n SQLite version: 3.30.1;\n SQLCipher version: 4.3.0 community;\n (deprecated) schema_version: 109;\n","time":"2020-06-25T12:46:24.491Z","v":0}
{"name":"log","hostname":"C43L37WS1065","pid":3120,"level":30,"msg":"Initializing BrowserWindow config: {\"show\":true,\"width\":800,\"height\":610,\"minWidth\":680,\"minHeight\":550,\"autoHideMenuBar\":false,\"backgroundColor\":\"#3a76f0\",\"webPreferences\":{\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"contextIsolation\":false,\"preload\":\"C:\\\\Users\\\\czxbwg\\\\AppData\\\\Local\\\\Programs\\\\signal-desktop\\\\resources\\\\app.asar\\\\preload.js\",\"na
git clone https://github.com/MestreLion/wavegain.git
Cloning into 'wavegain'...
remote: Enumerating objects: 39, done.
remote: Counting objects: 100% (39/39), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 265 (delta 11), reused 23 (delta 8), pack-reused 226
Receiving objects: 100% (265/265), 13.87 MiB | 1.45 MiB/s, done.
Resolving deltas: 100% (112/112), done.
cd wavegain/