Skip to content

Instantly share code, notes, and snippets.

@laggardkernel
laggardkernel / link-nvim-conf-to-vim.md
Last active February 12, 2023 23:45
Share confs between vim and nvim #vim
@rmetzler
rmetzler / test.py
Created June 5, 2019 19:52 — forked from dmsimard/test.py
ara with ansible-runner
#!/usr/bin/env python3
# Proof of concept ara with ansible-runner
# Requires https://github.com/ansible/ansible-runner/issues/219#issuecomment-496191227
import ansible_runner
import os
from ara.setup import callback_plugins
PLAYBOOK = """
- name: Test for ansible-runner
@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
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 July 20, 2023 19:12
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
@mosquito
mosquito / README.md
Last active April 27, 2024 00:07
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. 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 30, 2024 21:38
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