Skip to content

Instantly share code, notes, and snippets.

Avatar

mftrhu

  • Italy
View GitHub Profile
@mftrhu
mftrhu / gemini-server.rkt
Created May 15, 2021
A trivial gemini server in 100 lines of racket
View gemini-server.rkt
#lang racket
;; Limit our memory usage
(custodian-limit-memory (current-custodian) (* 16 1024 1024))
;; Load libraries
(require openssl)
(require racket/date)
(require net/url-string)
;; Define the folders we are going to use
@mftrhu
mftrhu / ddg.sh
Created Dec 24, 2017
ddg.sh - Search the internet with DuckDuckGo from your terminal
View ddg.sh
#!/bin/sh
# ddg.sh - Search the internet with DuckDuckGo from your terminal
# Made with boredom, on Christmas Eve, by mftrhu
# Requirements:
# awk, curl OR wget, sed, head, tail, grep, tput (MAYBE)
available () {
command -v "$1" >/dev/null 2>&1
}
@mftrhu
mftrhu / google.sh
Last active Jun 28, 2019
A simple shell script to get Google search results on the terminal
View google.sh
#! /bin/sh
split () {
awk -F "$1" "{print \$$2}" -
}
between () {
split "$1" 2 | split "$2" 1
}
View keybase.md

Keybase proof

I hereby claim:

  • I am mftrhu on github.
  • I am mftrhu (https://keybase.io/mftrhu) on keybase.
  • I have a public key whose fingerprint is 72C1 98E7 3161 1929 6C37 4055 A45D 2F4C C0A6 DACC

To claim this, I am signing this object:

@mftrhu
mftrhu / mud.py
Created Aug 11, 2016
The beginning of a (very, very simple) MU* game
View mud.py
#!/usr/bin/env python
import socket
import thread
import logging
import time
import random
HOST = ""
PORT = 4004