Skip to content

Instantly share code, notes, and snippets.

View inverse's full-sized avatar

Malachi Soord inverse

View GitHub Profile
@inverse
inverse / gist:ba737bd592eb5209b8c5
Last active August 29, 2015 14:15 — forked from shanselman/gist:969e190dcb21d9814c57
My Boxstarter config
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst 7zip
cinst 7zip.install
cinst AdobeAIR
cinst adobereader
cinst DotNet4.5.1
cinst filezilla
cinst git
@inverse
inverse / build.xml
Last active January 4, 2016 06:59
Basic CodeIgniter deployment using Mercurial via SSH.
<project name="deploy" default="help" basedir=".">
<!--
Required properties:
Repo to pull from
- repo
Location to deploy too
- deploy.location
@inverse
inverse / lastfmextra.user.js
Last active February 10, 2016 06:02
Last.fm Extra
// ==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==
@inverse
inverse / photoProcess.sh
Last active March 11, 2018 20:04
Process Photos
#!/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
@inverse
inverse / scraping.js
Last active April 25, 2018 19:37
scraping
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++) {
@inverse
inverse / update.sh
Last active October 9, 2018 19:04
Update espurna
#!/bin/bash
declare -a devices=(
""
)
USER=""
PASS=""
# Environment you're deploying
- name: PHP | Install ondrej PPA
apt_repository:
repo: 'ppa:ondrej/php'
state: present
tags: php
- name: PHP | Install packages
apt:
name: '{{ item }}'
state: latest
@inverse
inverse / prepare-commit-msg
Last active July 9, 2020 06:48
Git hook for adding branch name to commit message if it conforms to ticket naming convention
#!/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
@inverse
inverse / update.sh
Created August 26, 2020 18:15
Psalm updater
#!/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.*?(?=")')
# 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