Skip to content

Instantly share code, notes, and snippets.

View robertgzr's full-sized avatar
🐧

Robert Günzler robertgzr

🐧
View GitHub Profile
@robertgzr
robertgzr / Personal Homebrew Taps.md
Last active October 29, 2022 20:07
How to create a personal homebrew tap

Creating your own Tap

You need a repo (on Github).

The name is important as it should be something with homebew- as a prefix. That way it is super easy to add via the brew tap command.

Put the formulas you want to be in your tap into the root of your repo.

It may be username/homebrew-tap

@robertgzr
robertgzr / finder_to_mpv.scpt
Last active October 10, 2015 15:05
Play clipboard conent with mpv (using iTerm) - AppleScript
set mpv_command to ("mpv " & "'" & (the clipboard as text) & "'")
tell application "iTerm"
activate
tell first window
if (count of tabs) is greater than 1 then
tell last tab
tell current session
@robertgzr
robertgzr / gob.go
Created September 21, 2016 21:52
gob encoding/decoding
func Save(path string, obj interface{}) (err error) {
file, err := os.Create(path)
defer file.Close()
if err == nil {
encoder := gob.NewEncoder(file)
err = encoder.Encode(obj)
}
return
diff --git a/src/config.rs b/src/config.rs
index 5142b9b..80fe5a2 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -369,6 +369,7 @@ impl de::Deserialize for ActionWrapper {
"Paste" => Action::Paste,
"Copy" => Action::Copy,
"PasteSelection" => Action::PasteSelection,
+ "OpenNewWindow" => Action::OpenNewWindow,
"Quit" => Action::Quit,
/tmp/tectonic-0.1.5 # cargo build --release
Compiling tectonic v0.1.5 (file:///tmp/tectonic-0.1.5)
error: failed to run custom build command for `tectonic v0.1.5 (file:///tmp/tectonic-0.1.5)`
process didn't exit successfully: `/tmp/tectonic-0.1.5/target/release/build/tectonic-f01f6fbaff298a97/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/lib
cargo:rustc-link-lib=fontconfig
cargo:rustc-link-lib=harfbuzz-icu
cargo:rustc-link-lib=harfbuzz
cargo:rustc-link-lib=icuuc
@robertgzr
robertgzr / arm_versions.patch
Last active September 15, 2017 13:26
patch aur/traefik-bin to provide bins for arm/arm64
diff --git a/.SRCINFO b/.SRCINFO
index e6fd74a..cfd6c05 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,35 @@
pkgbase = traefik-bin
pkgdesc = A modern reverse proxy
- pkgver = 1.3.7
+ pkgver = 1.3.8
pkgrel = 1
#!/bin/sh
set -ex
sudo systemd-run --pty -E CNI_PATH=$CNI_PATH ./cnispawn -i -M kubespawndefault0 \
--overlay=+/etc:/var/lib/kube-spawn/default/rootfs/etc:/var/lib/kube-spawn/default/kubespawndefault0/rootfs/etc:/etc \
--overlay=+/opt:/var/lib/kube-spawn/default/rootfs/opt:/var/lib/kube-spawn/default/kubespawndefault0/rootfs/opt:/opt \
--overlay-ro=+/usr/bin:/var/lib/kube-spawn/default/rootfs/usr/bin:/var/lib/kube-spawn/default/kubespawndefault0/rootfs/usr/bin:/usr/bin \
--bind-ro=/home/vagrant/go/bin:/opt/cni/bin \
--bind=/var/lib/kube-spawn/default/kubespawndefault0/mount:/var/lib/docker;
jobsrv.1 | DEBUG:habitat_builder_jobsrv::server::handlers: job_group_create message: origin: "robertgzr" package: "it-works" deps_only: false target: "x86_64-linux" origin_only: false package_only: false
jobsrv.1 | DEBUG:habitat_builder_jobsrv::server::handlers: Resolved project name: PT0.000041059S sec
jobsrv.1 |
jobsrv.1 | DEBUG:habitat_builder_jobsrv::server::handlers: Graph rdeps: 0 items (PT0.000823451S sec)
jobsrv.1 |
jobsrv.1 | DEBUG:habitat_builder_jobsrv::data_store: JobGroup robertgzr/it-works not queued (not found)
jobsrv.1 | DEBUG:habitat_builder_jobsrv::data_store: JobGroup created: id: 862295310855315456 state: GroupQueued projects {name: "robertgzr/it-works" ident: "robertgzr/it-works/0.1.1/20171129144944" state: NotStarted} created_at: "2017-11-30T16:36:42.382149+00:00" project_name: "robertgzr/it-works"
jobsrv.1 | DEBUG:habitat_builder_jobsrv::server::scheduler: Process status: found 0 updated jobs
jobsrv.1 | DEBUG:habitat_builder_jobsrv::server::scheduler: Setting
// ==UserScript==
// @name y2hook-redir
// @namespace robertgzr
// @author robertgzr
// @description YouTube -> HookTube redirector
// @version 0.1.0
// @updateURL https://t.gnzler.io/y2hook
// @downloadURL https://t.gnzler.io/y2hook
// @license https://creativecommons.org/licenses/by-sa/4.0/
// @encoding utf-8
package main
import (
"fmt"
"net"
"net/http"
"os"
"os/signal"
"path/filepath"
"syscall"