Skip to content

Instantly share code, notes, and snippets.

View refnode's full-sized avatar
🎯
Focusing

Sven Wilhelm refnode

🎯
Focusing
View GitHub Profile
@refnode
refnode / init.lua
Created March 11, 2023 18:09
Hammerspoon Config
-- ~/.config/hammerspoon/init.lua
--
----------------------------------------------------------------------
-- Hammerspoon configuration file
----------------------------------------------------------------------
-- Enable ICP and install the Hammerspoon cli "hs" to /usr/local/bin
require("hs.ipc")
hs.ipc.cliInstall()
@refnode
refnode / init.lua
Created July 21, 2022 21:37
neovim lua lsp config
require('lspconfig').sumneko_lua.setup {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
},
diagnostics = {
@refnode
refnode / init.zsh
Created July 20, 2022 06:58
zsh-zle-fzf-kubernetes-widget
# small basic example to fetch all pods from k8s and fetch the pod definition into your vim
# alternative use 'bat' as cat replacement for great yaml syntax highlighting
fzf-kubectl-get-pods-widget() {
local selected namespace pod
local cmd="kubectl get pods -A"
local selected=( $(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m))
local ret=$?
if [ -n "$selected" ]; then
namespace=$selected[1]
pod=$selected[2]
hs.hotkey.bind(hyper, "p", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = 300
f.y = 100
f.w = max.x + 1864
f.h = max.y + 1055
win:setFrame(f)
@refnode
refnode / bootstrap.sh
Created April 9, 2019 19:11
macOS defaults
#!/bin/sh
defaults write com.apple.menuextra.battery ShowPercent -string YES
defaults write com.apple.systemuiserver menuExtras -array \
"/System/Library/CoreServices/Menu Extras/Clock.menu" \
"/System/Library/CoreServices/Menu Extras/Battery.menu" \
"/System/Library/CoreServices/Menu Extras/AirPort.menu" \
"/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \
"/System/Library/CoreServices/Menu Extras/Displays.menu" \
"/System/Library/CoreServices/Menu Extras/Volume.menu"

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@refnode
refnode / puppet-bootstrap.sh
Created July 12, 2015 18:35
Puppet Bootstrapping
#!/bin/sh
yum install -y git wget curl unzip
yum install -y https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
yum install -y puppet
@refnode
refnode / build.log
Created March 27, 2015 15:56
Build log for RHEL salt-testing
Mock Version: 1.2.7
Mock Version: 1.2.7
ENTER do(['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-salt-testing.spec'], chrootPath='/var/lib/mock/fedora-20-x86_64/root'shell=FalseprintOutput=Trueenv={'LANG': 'de_DE.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMASK': '002'}gid=135user='mockbuild'timeout=0logger=<mockbuild.trace_decorator.getLog object at 0x1dd9e10>uid=10005)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-salt-testing.spec'] with env {'LANG': 'de_DE.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMA
@refnode
refnode / python-project.mk
Created March 27, 2015 11:33
Python Project Makefile
#!/usr/bin/env python
# Copyright 2012, refnode <refnode@gmail.com>
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@refnode
refnode / build.sh
Created October 17, 2013 15:29
Mock Buildscript für Apache Thrift RPM
#!/bin/bash
# install package mock from fedora
# yum install rpmdevtools
#
# download thrift rpm from sys.fm
# the srpm file was not build in a clean dev environment,
# so requires some workarounds
# send some patches later
#