Skip to content

Instantly share code, notes, and snippets.

@mikelane
mikelane / game_of_life.py
Last active March 21, 2022 22:52
Conway's Game of Life implemented using a 2d convolution.
import click
import difflib
import numpy as np
import random
import sys
import time
from os import name, system
from scipy.ndimage import convolve
@atomize
atomize / _get.sh
Created February 26, 2019 22:03
bash function to download file from web without cURL/wget
# Add this to your .bashrc
# Use it like: you@console_>$ _get https://website.org/file.txt
_get ()
{
IFS=/ read proto z host query <<< "$1"
exec 3< /dev/tcp/$host/80
{
echo GET /$query HTTP/1.1
echo connection: close
echo host: $host
@bricewge
bricewge / Caddyfile
Created February 23, 2019 10:41
Deploying hugo blog with caddy
localhost:8080 {
root ./my-site
internal .repo
git {
repo https://github.com/kaushalmodi/hugo-bare-min-theme.git
path .repo
clone_args --depth 1 --recurse-submodules
pull_args --recurse-submodules
interval 3600
then hugo --source ./exampleSite --destination ../..
@sametz
sametz / braket.ipynb
Created June 9, 2018 17:38
Dirac notation (bra/ket) LaTeX commands for use in Jupyter notebooks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tstellanova
tstellanova / grub_arm64_debian.md
Last active April 3, 2025 08:54
Installing and running grub on rock64 (rk3328) arm64

Starting with Rock64, u-boot installed to SPI flash, Debian stretch installed to eMMC or micro SD card.

Setup /boot

Add things like dtb and any images you want to eventually load with grub

install grub

From Debian:

sudo apt-get -y install grub2-common efivar grub-efi-arm64
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 29, 2025 14:07
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@mosquito
mosquito / README.md
Last active April 13, 2025 18:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@jimmywarting
jimmywarting / readme.md
Last active April 29, 2025 08:29
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@abiosoft
abiosoft / Caddyfile
Created September 18, 2016 16:16
Caddy wordpress docker-compose
:80
root /usr/src/wordpress
gzip
fastcgi / wordpress:9000 php
rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}
log stdout
errors stderr
@disarticulate
disarticulate / angularjs_notebook.ipynb
Last active March 31, 2022 07:16
A notebook demonstrating how to use arbitrary frameworks (ie, AngularJS) within Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.