This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euf -o pipefail | |
if ! git rev-parse --is-inside-work-tree &>/dev/null; then | |
echo "Not in a git repository" | |
exit 1 | |
fi | |
TEMPLATE_PATH="$(git rev-parse --show-toplevel)/.git/template" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -uf -o pipefail | |
if ! git rev-parse --is-inside-work-tree &>/dev/null; then | |
echo "Not in a git repository" | |
exit 1 | |
fi | |
TEMPLATE_PATH="$(git rev-parse --show-toplevel)/.git/template" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn on the living room lamp every day 10 minutes before sunset. | |
- alias: "Living Room - Sunset" | |
trigger: | |
- platform: sun | |
event: sunset | |
offset: "-00:10:00" | |
action: | |
- service: yeelight.set_color_scene | |
data: | |
entity_id: light.xiaomi_yeelight_rgbw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PACKAGE=psalm | |
REPO=vimeo/$PACKAGE | |
if [ "$#" -ne 1 ] | |
then | |
echo "Trying ro resolve latest..." | |
VERSION=$(curl --silent "https://api.github.com/repos/${REPO}/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: PHP | Install ondrej PPA | |
apt_repository: | |
repo: 'ppa:ondrej/php' | |
state: present | |
tags: php | |
- name: PHP | Install packages | |
apt: | |
name: '{{ item }}' | |
state: latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prepend branch name to commit message in [] if matching regex. e.g. DEN-123 | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" | |
BRANCH_IN_COMMIT=$(grep -c "\[$BRANCH_NAME\]" $1) | |
if [ -n "$BRANCH_NAME" ] && [[ $BRANCH_NAME =~ ^([A-Z]+-[0-9]+)(\-.+)?$ ]] && ! [[ $BRANCH_IN_COMMIT -ge 1 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a devices=( | |
"" | |
) | |
USER="" | |
PASS="" | |
# Environment you're deploying |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch({args: ['--no-sandbox'], headless: true}); | |
const page = await browser.newPage(); | |
await page.goto('https://www.bibiblocksberg.de/hoerspiele'); | |
const loadMoreSelector = '.pager__item a'; | |
for(i = 0; i < 6; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Dependencies | |
# | |
# - exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/) | |
# - sortphotos (https://github.com/andrewning/sortphotos) | |
# | |
if ! [ -x "$(command -v exiftool)" ]; then | |
echo 'Error: exiftool is not installed.' >&2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Last.fm Extra | |
// @namespace https://malachisoord.com/ | |
// @version 0.1.3 | |
// @description Provide missing extra functionality to Last.fm | |
// @author Malachi Soord | |
// @match http://www.last.fm/* | |
// @require https://code.jquery.com/jquery-2.2.0.min.js | |
// @run-at document-idle | |
// ==/UserScript== |
NewerOlder