Skip to content

Instantly share code, notes, and snippets.

View LaPingvino's full-sized avatar
🏠
@ Home

Joop Kiefte LaPingvino

🏠
@ Home
View GitHub Profile
package main
import (
"os"
"fmt"
"bufio"
"encoding/json"
"strings"
"strconv"
)
@LaPingvino
LaPingvino / letters.go
Created August 25, 2020 00:52
Checking pangram
package main
import (
"fmt"
"unicode"
)
var sentence = "Meze de ŝakaĵoj, Wesley celas ankaŭ fine havi la ĝuon de bela ĉina teĥniko per Xiangqi"
var alphabet = "abcĉdefgĝhĥijĵklmnopqrsŝtuŭvwxyz"

Keybase proof

I hereby claim:

  • I am lapingvino on github.
  • I am lapingvino (https://keybase.io/lapingvino) on keybase.
  • I have a public key ASDpmBb-f7iSewjojt7olPuA-4iu0Fh9FtUrKcJ9fMPtAQo

To claim this, I am signing this object:

@LaPingvino
LaPingvino / tictactoe.go
Created February 26, 2020 04:33
Simple tic tac toe implementation, no AI
package main
import "fmt"
type field int
type line [3]field
type board [3]line
#include <stdio.h>
#include <stdlib.h>
struct result {
long element;
struct result *next;
};
struct result *solutions(long a, long b, long m) {
static struct result *res;
@LaPingvino
LaPingvino / main.go
Last active September 28, 2019 21:06
sumigo
package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"os"
"strconv"
)
@LaPingvino
LaPingvino / smm2grep.go
Last active July 3, 2019 13:48
Super Mario Maker 2 level id grep from Twitch chat
package main
import (
"crypto/tls"
"fmt"
"os"
"regexp"
irc "github.com/fluffle/goirc/client"
)
@LaPingvino
LaPingvino / index.html
Last active March 2, 2019 03:45
oPOOPo
<!DOCTYPE html>
<link rel="stylesheet" href="style.css" />
<title>Kiefte.eu - Joop Kiefte</title>
<h1>Welcome to the online presence of Joop Kiefte</h1>
<p>This website is hosted on <a href="https://ipfs.io">ipfs</a> and served through <a href="https://cloudflare-ipfs.com">Cloudflare Distributed Web</a>. You can visit this website directly via an <a href="ipns://kiefte.eu">ipns-link</a> or a <a href="dweb:/ipns/kiefte.eu">dweb:-link</a>.
<div class="links">
<ul>
<li><a href="mailto:joop@kiefte.net?body=Dear Joop, I contact you through kiefte.eu because ">Mail me</a></li>
<li>Facebook: <a href="https://facebook.com/lapingvino">Joop Kiefte (LaPingvino)</a></li>
@LaPingvino
LaPingvino / charcount.go
Last active September 23, 2018 01:02
Reads text from stdin, outputs CSV-formatted list of every unicode character (rune) in the file together with a number that says how much it appears
package main
// Because this code is so short and obvious, it should be considered public domain
import "os"
import "io/ioutil"
import "encoding/csv"
import "strconv"
func main() {
@LaPingvino
LaPingvino / plustags-draft.md
Last active August 28, 2018 15:31
A proposal for a standard for location based services by short messages

Plustags: A proposal for a standard for location based services by short messages

At the end of 2014, Google Zürich invented the Open Location Code standard, casually known as Plus-codes, explained at https://plus.codes and already implemented in Google Maps, OsmAnd, Maps.me and the Cape Verdean postal service. A Plus-code can be long or short, the long variant being 8 characters, a plus sign and then two other characters, with the possibility to add a last character for a precision of about 3x3km. The precision of the described location is going from less to more precise from left to right. It is possible to pad a part of the code with zeros and to leave the part after the plus to achieve lesser precision. In combination with a local reference point also a shorter form with only the last 4 or 6 characters before the plus is possible (or even only 2, although this might be a source of mistakes in practice.)

For the purpose of this proposal the long codes are expected to be used because they can be parsed