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 / .ansible.cfg
Created December 7, 2017 12:52
Dot files
# cat ~/.ansible.cfg
[defaults]
stdout_callback = debug
retry_files_enabled = False
@elmariofredo
elmariofredo / supaclone
Created November 29, 2017 23:49
Cloning github/gitlab/copanyhub in consistent way
#!/usr/bin/env python
import sys, subprocess, os
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
rawRepoUrl = sys.argv[1]
@elmariofredo
elmariofredo / measure.sh
Last active October 4, 2017 12:34
Simple http throughput test using curl
#!/bin/bash
URL=$1
NAME=${URL:7}
echo "Press [CTRL+C] to stop..."
while :
do
echo $(date +%s) $(curl --max-time 10 -w "%{time_connect} %{time_starttransfer} %{time_total} %{http_code}" -o NUL -s "${URL}") | tee -a ${NAME}.log.txt
@elmariofredo
elmariofredo / docker-compose.yml
Created August 8, 2017 15:39
Test compose file
version: "3"
services:
web:
image: nginx
@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 {
@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"
}