Skip to content

Instantly share code, notes, and snippets.

View OdinsPlasmaRifle's full-sized avatar
💀
In an ancient crypt

Joshua van Besouw OdinsPlasmaRifle

💀
In an ancient crypt
View GitHub Profile
@OdinsPlasmaRifle
OdinsPlasmaRifle / jwt.go
Last active July 4, 2017 09:38
JWT Tokens using jwt-go
package components
import (
"crypto/rsa"
jwt "github.com/dgrijalva/jwt-go"
"io/ioutil"
"log"
"time"
)
@OdinsPlasmaRifle
OdinsPlasmaRifle / managers.py
Last active February 5, 2024 16:56
Haversine formula in Django using Postgres SQL
from django.db import models, connection
"""
Haversine formula in Django using Postgres SQL
Queries a model for all rows that are within a certain radius (given in meters) of a central point.
The 'location_model' placeholder should be raplaced with the name of the table (full name) that includes a latitude and longitude column.
The latitude and longitude columns should be decimal fields.

GIT Cheatsheet

Subtree

Basic subtree:

git subtree push --prefix {directory} origin gh-pages
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active March 29, 2024 14:12
LVM on LUKS Arch installation with systemd-boot
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_packages.md
Last active April 12, 2022 14:12
Packages for a development environment

Arch Linux Packages

Packages for an Arch Linux development environment

Pacman Install

  • zsh
  • rxvt-unicode
  • iw
  • iwd
  • dhcpcd

Linux Cheatsheet

Docker Maintenance

Remove dangling images:

docker image prune
@OdinsPlasmaRifle
OdinsPlasmaRifle / go_sqlite.go
Last active October 11, 2017 12:59
Basic SQLite Usage in Go
import (
"database/sql"
"fmt"
_ "github.com/mattn/go-sqlite3"
)
func main() {
db, err := sql.Open("sqlite3", "db.sql")
if err != nil {
@OdinsPlasmaRifle
OdinsPlasmaRifle / python_timed_code_snippet.py
Last active September 15, 2019 22:13
Snippet for Timing Python Code
import time
start_time = time.process_time()
# Timed code.
print("Duration:", time.process_time() - start_time, "seconds")

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Rising Sun Substitute FAQ

Movement

There are 3 action types available to figurines in Rising Sun : Move, Summon, and Place.

Monsters

Oni of Plagues