Skip to content

Instantly share code, notes, and snippets.

View blueyed's full-sized avatar
💭
❤️ not eating nor abusing animals 🍀

Daniel Hahler blueyed

💭
❤️ not eating nor abusing animals 🍀
View GitHub Profile
<target name="run">
<exec executable="sh"
failifexecutionfails="true"
failonerror="true"
dir="${testnode.dir}">
<arg value="run.sh"/>
<arg value="start"/>
</exec>
</target>
#!/bin/bash
cat .gitignore | egrep -v "^#|^$" | while read line; do
if [ -n "$line" ]; then
for ignored_file in $( git ls-files "$line" ); do
git rm --cached "$ignored_file"
done
fi
done
@blueyed
blueyed / Puppet config snippet to define a Launchpad PPA
Created February 25, 2011 23:48
This defines pparepo which allows to add a PPA (Personal Package Archive) repository from Launchpad to a client. It uses apt::key, which I have taken (and maybe modified) from http://projects.puppetlabs.com/projects/1/wiki/Apt_Keys_Patterns (blog post at
# Setup a PPA repo, where the name is "user/ppaname", e.g. "blueyed/ppa" ("ppa" being the default)
define pparepo($apt_key = "", $dist = $ppa_default_name, $supported = ["lucid", "hardy"], $ensure = present, $keyserver = "keyserver.ubuntu.com") {
$name_for_file = regsubst($name, '/', '-', 'G')
$file = "/etc/apt/sources.list.d/pparepo-${name_for_file}.list"
file { "$file": }
case $ensure {
present: {
if ($dist) and ($dist in $supported) {
File["$file"] {
@blueyed
blueyed / vz-double-resources.sh
Created March 15, 2011 22:03
vz-double-resources, also works as vz-half-resources
#!/bin/bash
VZ="$1"
RESOURCE="$2"
if [ -z $VZ ] || [ -z $RESOURCE ]; then
echo "Usage: $0 VZ RESOURCE"
exit 1
fi
@blueyed
blueyed / _tmux_pane_words.zsh
Last active May 26, 2023 07:39
ZSH configuration to complete words from tmux pane(s)
# Complete words from tmux pane(s) {{{1
# Source: http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html
# Gist: https://gist.github.com/blueyed/6856354
_tmux_pane_words() {
local expl
local -a w
if [[ -z "$TMUX_PANE" ]]; then
_message "not running inside tmux!"
return 1
fi
#!/bin/sh
# Experimental: rename a AwesomeWM tag, using Zenity for UI.
#
# Should be easier.
# Query current tag name
cur=$(echo 'return require("awful").tag.selected().name' | awesome-client | sed -nE 's/.*?"(.*)"$/\1/p')
echo "cur: $cur"
# Ask for the new name
@blueyed
blueyed / awesome-rename-tag.rc.lua
Last active November 6, 2019 13:46
awesomeWM: rename the current tag
-- Rename tag
awful.key({ modkey, "Shift", }, "F2", function ()
awful.prompt.run({ prompt = "Rename tab: ", text = awful.tag.selected().name, },
mypromptbox[mouse.screen].widget,
function (s)
awful.tag.selected().name = s
end)
end),
@blueyed
blueyed / -
Created March 15, 2014 16:35
0
-- Rename tag
-- Reference: http://awesome.naquadah.org/doc/api/modules/awful.prompt.html
awful.key({ modkey, "Shift", }, "F2", function ()
awful.prompt.run({ prompt = "Rename tab: ", text = awful.tag.selected().name, },
mypromptbox[mouse.screen].widget,
function (s)
awful.tag.selected().name = s
end)
end),
client.connect_signal("request::activate", function(c)
if c:isvisible() then
client.focus = c
c:raise()
else
if not awesome_startup then
c.urgent = true
end
end
end)
### Keybase proof
I hereby claim:
* I am blueyed on github.
* I am blueyed (https://keybase.io/blueyed) on keybase.
* I have a public key whose fingerprint is B5A6 C220 829F AE5D 69EB 9CA3 7C02 BF85 3FE6 3E00
To claim this, I am signing this object: