Skip to content

Instantly share code, notes, and snippets.

Avatar
🔪
Sharpening the saw

Alexander Groß agross

🔪
Sharpening the saw
View GitHub Profile
View Umlauts.ahk
; Make script persistent.
#Persistent
; Recommended for performance and compatibility with future AutoHotkey releases.
#NoEnv
; Recommended for new scripts due to its superior speed and reliability.
SendMode Input
#SingleInstance force
Menu Tray, Tip, Snippets
@agross
agross / backup-images.zsh
Last active Oct 12, 2019
Back up images, skip those having a DNG or RAW file in a "raw" subdirectory
View backup-images.zsh
#!/usr/bin/env zsh
set -eu
setopt pipe_fail
setopt extended_glob
mkdir -p images \
images/only-raw/raw \
images/only-jpeg \
images/jpeg-and-raw/raw \
View docker-compose.yaml
version: '2.3'
services:
mariadb:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: secret
volumes:
- ./wp/mariadb/conf:/etc/mysql/conf.d:ro
- ./wp/mariadb/data:/var/lib/mysql
@agross
agross / command line runner.sh
Created May 17, 2019
TeamCity Command Line Runner script that supports both Windows (cmd) and *nix (sh)
View command line runner.sh
:; if [ -z 0 ]; then
goto :windows
fi
# Linux script follows.
if [ ! -f .ruby-version ]; then
echo %ruby.version% > .ruby-version
fi
rbenv install --skip-existing && \
View git-merge-nested-repos.sh
#!/usr/bin/env bash
# https://help.github.com/articles/about-git-subtree-merges/
set -euo pipefail
red='\e[1;31m'
green='\e[1;32m'
yellow='\e[1;33m'
reset='\e[0m'
View sass_with_compass.rb
# frozen_string_literal: true
require 'nanoc'
module Nanoc
module Filters
class SassWithCompass < Nanoc::Filter
identifier :sass_with_compass
type :text
@agross
agross / Dockerfile
Last active Jan 11, 2019
Synology DS2415+ docker 17.05 does not support --build-arg
View Dockerfile
FROM busybox
ARG FOO
RUN env && echo $FOO
View persons.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Name;Age;City
Peter;42;New York
Paul;57;London
Mary;35;Munich
Jaques;66;Paris
Yuri;23;Moscow
Stefanie;47;Stockholm
Nadia;29;Madrid
View topshelf.cs
public class Program
{
public static void Main(string[] args)
{
HostFactory.Run(x =>
{
x.Service<ClassThatHasStartAndStopMethods>(s =>
{
// optional, when you want an IoC to resolve deps.
s.ConstructUsing(settings => new MefBootstrapper(settings).Root);
View crash.log
Crashlog created at 2017-03-02 12:28:36 +0100
===== MESSAGE:
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/folders/c6/2ysv_j9j4hdgtzsnhrvflvtc0000gn/T/nanoc20170301-90191-10tx8nn/binary_items/1
===== ITEM BEING COMPILED:
Item identifier: /assets/images/1x1-pixel.png
Item rep name: :default
You can’t perform that action at this time.