Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@moritzh
moritzh / ngrok.service
Created October 16, 2023 21:01
ngrok service file for debian-esque distributions
# Contents of /etc/systemd/system/ngrok.service
[Unit]
Description=ngrok
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/ngrok http --domain $YOURDOMAINGOESHERE 80
User=$YOURUSER

Keybase proof

I hereby claim:

To claim this, I am signing this object:

//
// CellSizeCalculator.h
//
// Created by Moritz Haarmann on 19.09.12.
// Copyright (c) 2012 n/a. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CSCLabelElement : NSObject
Never work in IT.
@moritzh
moritzh / gist:2937136
Created June 15, 2012 15:45
Script to read RunKeeper.sqlite files and convert the data to .gpx files.
# Simple HowTo: Grab the Application PhoneView or something else to gather the "RunKeeper.sqlite" from your iPhone's RunKeeper Application Directory.
# Put it in the same directory as the "to_gpx.rb" script. simply run the to_gpx.rb script using
# ruby to_gpx.rb
# you should now have a collection of gpx files, numbered according to the internal trip_ids used by runkeeper. you can upload these gpx files to runkeeper.
# Requirements:
# - 'sqlite3-ruby'
require 'date'
@moritzh
moritzh / gist:1427439
Created December 3, 2011 15:58
Basic Warrior example for Sparta
@warrior = Sparta::Warrior.new({:provider=>'amazonec2'})
@warrior.arm(Weapon.new(:ApacheBenchmark))
@warrior.attack!('http://www.github.com/', {:concurrency=>50, numbers=>500})
launch_instances(10, :ec2) do |instance|
instance.install('apache')
instance.install('jmeter')
end
equest timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
Request timeout for icmp_seq 10