Skip to content

Instantly share code, notes, and snippets.

View filiph's full-sized avatar
:shipit:

Filip Hracek filiph

:shipit:
View GitHub Profile
@kccqzy
kccqzy / unsure_calc.py
Created April 15, 2025 19:49
The unsure calculator inspired by https://filiph.github.io/unsure/
import numpy as np
import re
NUMBER = re.compile(r'[0-9]+(\.[0-9]+)?')
def tokenize(s):
orig_str = s
while len(s) > 0:
m = NUMBER.match(s)
if m:
@sma
sma / terminal-flutter.md
Last active October 3, 2024 19:12
For fun, I wrote a Flutter-like framework for command line applications

Terminal Flutter

For fun, I recreated a subset of Flutter that is sufficient to build a tiny Minesweeper application for the terminal.

Here is how it looks:

+----------------------+
|Minesweeper       3/12|
| |
@benhuson
benhuson / .htaccess
Created September 14, 2016 11:42
Disable HTTP Strict Transport Security (HSTS) in .htaccess
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=0; includeSubDomains; preload" env=HTTPS
</IfModule>
@mullnerz
mullnerz / archive-website.md
Last active April 27, 2025 01:15
Archiving a website with wget

The command I use to archive a single website

wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P . www.foo.com

Explanation of the parameters used

  • -m (Mirror) Turns on mirror-friendly settings like infinite recursion depth, timestamps, etc.
@asfaltboy
asfaltboy / clip_magic.py
Last active September 20, 2021 22:23 — forked from nova77/clip_magic.py
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results