Skip to content

Instantly share code, notes, and snippets.

View johanhammar's full-sized avatar

Johan Hammar johanhammar

View GitHub Profile
@johanhammar
johanhammar / gist:3852055
Created October 8, 2012 11:36
Sublime Text 2 settings
{
"color_scheme": "Packages/TomorrowTheme/Tomorrow-Night.tmTheme",
"draw_white_space": "all",
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"_build",
@johanhammar
johanhammar / gist:c5f41542cbcb8ad727e4
Created August 26, 2015 11:38
Swagger nested arrays
swagger: '2.0'
info:
version: "0.0.1"
title: Nested arrays
description: Demo of nested arrays
contact:
name: Johan Hammar
host: localhost

Keybase proof

I hereby claim:

  • I am johanhammar on github.
  • I am johanhammar (https://keybase.io/johanhammar) on keybase.
  • I have a public key ASBJ7GmbZ4rZa0SnrxMeun1CNv6a7DwIQc-l8SbYSY0Wuwo

To claim this, I am signing this object:

➜ dnsperftest git:(master) ./dnstest.sh
test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 Average
192.168.1.1 11 ms 6 ms 7 ms 6 ms 7 ms 8 ms 1 ms 6 ms 7 ms 29 ms 8.80
cloudflare 9 ms 10 ms 9 ms 10 ms 9 ms 39 ms 12 ms 10 ms 10 ms 9 ms 12.70
level3 38 ms 40 ms 47 ms 38 ms 39 ms 38 ms 92 ms 39 ms 39 ms 38 ms 44.80
google 9 ms 18 ms 10 ms 9 ms 32 ms 53 ms 9 ms 21 ms 40 ms 19 ms 22.00
quad9 30 ms 40 ms 29 ms 48 ms 30 ms 31 ms 32 ms 32 ms 39 ms 52 ms 36.30
freenom 21 ms 56 ms 20 ms 25 ms 21 ms 144 ms 21 ms 33 ms 25 ms 99 ms 46.50
opendns 12 ms 13 ms 22 ms 38 ms 29 ms 32 ms 12 ms 38 ms 23 ms 27 ms 24.60
norton 91 ms 43 ms 39 ms 40 ms 39 ms 39 ms 44 ms 61 ms 43 ms 79 ms 51.80
@johanhammar
johanhammar / bootstrap-win10.ps1
Last active December 30, 2018 19:45
Bootstrap Win10 using Boxstarter
# Run with:
# Install-BoxstarterPackage -PackageName <raw-gist-url> -DisableReboots
# Inspiration from
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
Disable-UAC
# Windows configuration
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
@johanhammar
johanhammar / slack_light_owl
Created November 20, 2020 18:59
Slack Light Owl theme
Paste the following in File -> Preferences... -> Themes
#F0F0F0,#1D3B53,#E0E7EA,#DAA001,#E0E7EA,#403F53,#ADDB67,#7E57C2,#DADADA,#403F53
...
@Test
public void testSetSslEndpointIdentificationAlgorithm() throws Exception {
RestService restService = new RestService("https://localhost:8081");
Map<String, Object> configs = new HashMap<>();
configs.put(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, "");
restService.configure(configs);
#!/bin/bash
#Removes old revisions of snaps
#CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@johanhammar
johanhammar / github.sh
Created April 1, 2024 11:51
Clone GitHub repositories
#!/usr/bin/env bash
if ! command -v fzf &> /dev/null
then
echo "Fzf could not be found. See https://github.com/junegunn/fzf"
exit 1
fi
if ! command -v jq &> /dev/null
then