Skip to content

Instantly share code, notes, and snippets.

View mariotacke's full-sized avatar
💻
Specializing in the outrageous.

Mario Tacke mariotacke

💻
Specializing in the outrageous.
View GitHub Profile
@mariotacke
mariotacke / README.md
Last active July 5, 2021 07:44
Gulp replace to invalidate cache

Gulp replace to invalidate cache

This demo replaces the string @@VERSION with the current unix timestamp when building with gulp. @@VERSION is a query parameter to bundle.js. To avoid caching bundle.js, we add the timestamp to it during each build.

Usage

npm install
npm run build
@mariotacke
mariotacke / init.coffee
Last active May 15, 2018 19:52
Atom Sync Settings
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@mariotacke
mariotacke / teamcity-agent
Last active February 23, 2021 14:57
/etc/init.d/teamcity-agent auto start script for TeamCity Agents
#!/bin/sh
### BEGIN INIT INFO
# Provides: TeamCity Build Agent
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start build agent daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@mariotacke
mariotacke / README.md
Last active April 4, 2024 14:33
Spotify AutoHotkey Script

Spotify AutoHotkey Script

This script makes use of the Numpad to control media players and volume on your system.

Usage

  • Install AutoHotkey
  • Right-click .ahk script
  • Compile Script
  • Start executable

Hotkeys

Keybase proof

I hereby claim:

  • I am mariotacke on github.
  • I am mariotacke (https://keybase.io/mariotacke) on keybase.
  • I have a public key whose fingerprint is 1F76 387C 0FA4 7B32 B93E 8211 24A9 1971 A631 92F4

To claim this, I am signing this object:

@mariotacke
mariotacke / README.md
Created March 7, 2017 04:36
Default nginx log format (combined) and grok pattern
@mariotacke
mariotacke / .eslintrc
Last active May 29, 2018 16:47
ESLint Configs
{
"env": {
"node": true,
"es6": true
},
"extends": [
"eslint:recommended"
],
"parserOptions": {
"sourceType": "module",
@mariotacke
mariotacke / rabbitmq-password.sh
Created December 18, 2018 21:26
Computing RabbitMQ Password Hashes
# https://www.rabbitmq.com/passwords.html#computing-password-hash
PASSWORD=$(openssl rand -base64 20)
SALT=$(openssl rand -hex 4)
HASH=$(echo -n "$SALT"$(echo -n "$PASSWORD" | xxd -u -p) | xxd -r -p | sha256sum | head -c 64)
PASSWORD_HASH=$(echo -n $SALT$HASH | xxd -r -p | base64)
echo $PASSWORD
echo $PASSWORD_HASH
@mariotacke
mariotacke / server.js
Created May 19, 2019 21:53
blog-real-time-word-cloud
const express = require('express');
const path = require('path');
const fs = require('fs');
const indexHtml = fs.readFileSync(path.join(__dirname, 'public', 'index.html'), 'utf8');
const app = express();
app.get('/', function (req, res) {
const html = indexHtml.replace(/\$CHANNEL_NAME/, process.env.CHANNEL_NAME);