Skip to content

Instantly share code, notes, and snippets.

View hmazter's full-sized avatar

Kristoffer Högberg hmazter

View GitHub Profile
@hmazter
hmazter / lighthouse.json
Created November 26, 2020 20:55
enjulföralla.se lighthouse report
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4143.7 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36",
"benchmarkIndex": 1043,
"credits": {
"axe-core": "3.5.5"
}
},
#!/bin/bash
ref=$(git symbolic-ref HEAD 2> /dev/null | grep -v '/master$') && echo "${ref#refs/heads/}"
@hmazter
hmazter / deployer.plugin.zsh
Created April 9, 2015 06:55
Deployer oh-my-zsh autocomplete plugin
# Deployer basic command completion
_deployer_get_command_list () {
deployer --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_deployer () {
compadd `_deployer_get_command_list`
}
compdef _deployer deployer
@hmazter
hmazter / gist:971d5224ffd725550422
Created January 15, 2015 08:25
Java IO Helper Example
/*
* An Example of an console IO Helper in Java
* Reading input until valid input is aquired
*/
// IOHelper.java
import java.util.Scanner;
public class IOHelper {
Scanner scanner;