Skip to content

Instantly share code, notes, and snippets.

View floriankammermann's full-sized avatar

Florian Kammermann floriankammermann

View GitHub Profile
/**
* We organize events in Berne related to the field of software engineering. The
* focus is to exchange knowledge and experience between software developers and
* companies, both on the professional as on the personal level. We believe that
* this helps to increases the attractiveness of Berne as a location to develop
* great software!
*/
public static int ultimateQuestion() {
int answer = 0;
int counter = 0;

How to create star history url's from cncf landscape

  1. get the landscape: curl https://raw.githubusercontent.com/cncf/landscape/master/landscape.yml > landscape.yml
  2. split into subcategories: csplit --digits=2 --quiet --prefix=outfile landscape.yml "/- subcategory:/+1" "{*}"
  3. remove outfile00, it has no information: rm outfile00
  4. rename to subcategory: for f in `ls | grep outfile`; do new_name=$(head $f | grep "^\s\s\s\s\s\s\s\sname:"| sed 's/.*name:\s//' | sed 's/\s&\s/_/' | tr ' ' '_' | tr '/' '_'); mv $f $new_name; done
  5. create url per subcategory: for f in `ls | grep -v landscape.yml`; do params=$(cat $f | grep repo_url | sed 's/^.*github.com\///' | sed 's/.$//' | tr '\n' '&' | sed 's/.$//'); echo $f: https://star-history.t9t.io/#$params; done
@floriankammermann
floriankammermann / URLTest.java
Last active December 2, 2023 03:32
URL Connection Test
import javax.net.ssl.*;
import java.io.IOException;
import java.net.*;
import java.security.cert.X509Certificate;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class URLTest {
@floriankammermann
floriankammermann / ipmatcher.go
Last active January 19, 2018 12:37
check if ip exists in networks
package main
import (
"fmt"
"os"
"bufio"
"net"
)
// the program needs two files in the directory