Skip to content

Instantly share code, notes, and snippets.

@funzoneq
funzoneq / rpki-client-install.md
Created April 20, 2020 10:29
Setup of rpki-client on Debian 10

Setup rpki-client on Debian 10

Install some requirements:

sudo apt-get install build-essential libssl-dev rsync

Create a user:

sudo useradd -Mr _rpki-client
require 'httparty'
def print_traffic_nl(road_name, road_type, total_length)
puts "nl_traffic_jam_kilometers{road_type=\"#{road_type}\",road_name=\"#{road_name}\"} #{total_length}"
end
response = HTTParty.get('http://api.routeradar.nl/api/v1/reports?query_type=overview')
response.parsed_response.each do |tra|
next if tra['type'] != 'jam'
@funzoneq
funzoneq / fetch.rb
Created July 22, 2016 14:13
Fetch a domain name, parse the words and check domain names.
require 'optparse'
require 'httparty'
require 'pp'
options = { domain: nil }
optparse = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.on("-dDOMAIN", "--domain=DOMAIN", "Domain to download") do |n|
@funzoneq
funzoneq / nslookupapi.go
Created July 22, 2016 14:12
nslookup go api endpoint
package main
import (
"fmt"
"github.com/julienschmidt/httprouter"
"github.com/miekg/dns"
"net/http"
"encoding/json"
"log"
)
@funzoneq
funzoneq / simplehttp.service
Created May 25, 2016 13:24
A systemd file for a python SimpleHTTPServer
[Unit]
Description=Job that runs the python SimpleHTTPServer daemon
Documentation=man:SimpleHTTPServer(1)
[Service]
Type=simple
WorkingDirectory=/tmp/letsencrypt
ExecStart=/usr/bin/python -m SimpleHTTPServer 80 &
ExecStop=/bin/kill `/bin/ps aux | /bin/grep SimpleHTTPServer | /bin/grep -v grep | /usr/bin/awk '{ print $2 }'`
@funzoneq
funzoneq / gpart.sh
Last active March 14, 2017 10:37
FreeBSD gmirror setup sata drives
gpart destroy -F ada0
gpart destroy -F ada1
gpart create -s gpt ada0
gpart create -s gpt ada1
gpart add -s 64k -t freebsd-boot -l boot0 ada0
gpart add -s 64k -t freebsd-boot -l boot1 ada1
gpart add -s 8G -t freebsd-swap -l swap0 ada0
#!/bin/bash -x
URL=$1
USER=$2
PASSWORD=$3
LATEST_FIRMWARE="0.00"
# ILO3 firmware: http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_ef5d840040af4d189c4b4991a7#tab-history
# ILO4 firmware: http://h20566.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_a6d201edd56c4ff4b7d0488d01#tab-history
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
sh install.sh -v 12.4.1 2>&1
Stdout from the command:
Downloading Chef 12.4.1 for ubuntu...
downloading https://www.getchef.com/chef/metadata?v=12.4.1&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64

Keybase proof

I hereby claim:

  • I am funzoneq on github.
  • I am funzoneq (https://keybase.io/funzoneq) on keybase.
  • I have a public key whose fingerprint is DA42 7BE5 95B2 DD32 8A87 BE53 A23D A8E9 3DFA D029

To claim this, I am signing this object:

#!/usr/bin/env ruby
require 'httparty'
require 'pp'
class HiberniaCDN
include HTTParty
#debug_output $stderr
base_uri 'https://portal.hiberniacdn.com/api.json/v1'