Skip to content

Instantly share code, notes, and snippets.

View elmariofredo's full-sized avatar
💭
building Cloud Native Thermostat 🔥 🥶

Mario Vejlupek elmariofredo

💭
building Cloud Native Thermostat 🔥 🥶
View GitHub Profile
@elmariofredo
elmariofredo / git-no-verify
Last active February 22, 2017 12:33
Auto add no verify to git push and commit
#!/bin/bash
if [[ $@ == *"push"* || $@ == *"commit"* ]];
then
$HOME/.nix-profile/bin/git $@ --no-verify
else
$HOME/.nix-profile/bin/git $@
fi
@elmariofredo
elmariofredo / css_regression_testing.md
Created December 13, 2016 13:13 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@elmariofredo
elmariofredo / cleanup-docker-containers.sh
Created December 1, 2016 12:59
Clean all default containers older than two hours
#!/bin/bash
docker ps -a | grep 'hours ago' | awk '{print $1}' | xargs --no-run-if-empty docker rm -f
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@elmariofredo
elmariofredo / TeamCityAgentsBatchEnable.py
Last active November 1, 2016 17:20
TeamCity disable/enable all agents from commandline
#!/usr/bin/env python
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
import argparse
parser = argparse.ArgumentParser( description='Enable/Disable TeamCity agents.' )
@elmariofredo
elmariofredo / cleanup-docker-networks.sh
Created October 30, 2016 19:18
Clean all default networks
#!/bin/bash
docker network rm $(docker network ls -q --filter="name=_default")
@elmariofredo
elmariofredo / DockerCompose.sh
Last active October 6, 2016 10:59
Docker bash onliners
# Get using dockek compose name and port for each service running
docker-compose ps | tail -n +3 | sed "s/.*_\([^_]*\)_.*0.0.0.0:\([^-]*\)->\([^/]*\).*/service: \1 Port: \3 PublicPort: \2/g"
@elmariofredo
elmariofredo / teamcity-agent.service
Last active March 4, 2021 10:13 — forked from BenWhitehead/teamcity-agent.service
systemd service files for running TeamCity (create in /usr/lib/systemd/system)
[Unit]
Description=TeamCity Build Agent
After=network.target
[Service]
Type=forking
RemainAfterExit=yes
PIDFile=/opt/tc01/logs/buildAgent.pid
Environment="JAVA_HOME=/usr/java/latest"
ExecStart=/opt/tc01/bin/agent.sh start
@elmariofredo
elmariofredo / webpack.config.js
Created September 26, 2016 12:57
Minimal Webpack 2 config
const { resolve } = require('path');
const webpack = require('webpack');
// plugins
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = (env) => {
return {