Skip to content

Instantly share code, notes, and snippets.

View mathiasose's full-sized avatar
💭
🤔

Mathias Ose mathiasose

💭
🤔
View GitHub Profile
@mathiasose
mathiasose / 👍.txt
Created December 1, 2021 10:36
txt with some unicode
🤠👍 æøå
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const { send, json } = require('micro');
function getRandomInt(max) {
return Math.floor(Math.random() * Math.floor(max));
}
async function throwDice(req, res) {
const n = getRandomInt(6) + 1;
@mathiasose
mathiasose / echo_server.py
Last active April 12, 2018 11:42 — forked from 1kastner/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python3
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import BaseHTTPRequestHandler, HTTPServer
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@mathiasose
mathiasose / README.md
Last active March 14, 2018 16:04 — forked from jleclanche/test_templates.py
Test that Django templates render without errors

Django test (pytest) that checks that templates render without errors.

Uses pytest.mark.parameterize to test each template as an individual test.

Uses Django's Loader to find templates. This will also find templates in third-party apps (i.e. in your virtualenv). If you want to exclude these from being tested you will need to modify the code to fit your own project structure. The above code assumes a list of local apps in the settings file (INSTALLED_APPS = VENV_APPS + LOCAL_APPS).

License: CC0

.cache/
.idea/
.ipynb_checkpoints/
.vscode/
[user]
email = mathias.ose@gmail.com
name = Mathias Ose
[push]
default = simple
[color]
ui = true
[core]
autocrlf = input
pager = diff-so-fancy | less --tabs=4 -RFX
@mathiasose
mathiasose / .zshrc
Last active September 15, 2020 09:06
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/home/ose/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Path to your oh-my-zsh installation.
export ZSH=/home/ose/.oh-my-zsh
@mathiasose
mathiasose / .profile
Last active September 15, 2020 09:05
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@mathiasose
mathiasose / qwerty-graph
Last active September 13, 2017 08:05 — forked from DingoEatingFuzz/qwerty-graph
A graph of each letter's neighbors on a qwerty keyboard.
a qwsz
b vghn
c xdfv
d serfcx
e wsdr
f drtgvc
g ftyhbv
h gyujnb
i ujko
j huikmn