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
@bwagner
bwagner / HTMLClipboard.py
Last active April 28, 2023 13:55 — forked from Erreinion/HTMLClipboard.py
HTMLClipboard with updates for Python 3. Includes exception handling for locked clipboard. Improvement of: http://code.activestate.com/recipes/474121/
#!/usr/bin/env python
"""
Created on Sep 24, 2013
@author: RandomHardcoreJerks
Requires pywin32
original: http://code.activestate.com/recipes/474121/
rm -f wavegain
gcc -arch i386 -s -DHAVE_CONFIG_H -o wavegain audio.c dither.c gain_analysis.c getopt.c getopt1.c main.c misc.c recurse.c wavegain.c -lm
audio.c:698:31: warning: passing 'char [8]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
opt->gain_scale = READ_D64(buf_double);
^~~~~~~~~~
audio.c:191:35: note: passing argument to parameter 'cptr' here
double read_d64_be(unsigned char *cptr)
^
1 warning generated.
ld: warning: option -s is obsolete and being ignored
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/
{"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
@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
@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 / # 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 / 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'
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 / 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)