Skip to content

Instantly share code, notes, and snippets.

View garentyler's full-sized avatar

Garen Tyler garentyler

View GitHub Profile
@jbrazio
jbrazio / conf.d-minecraft
Created May 30, 2020 14:50
[OpenRC] Minecraft server
# /etc/conf.d/minecraft
#
# Minecraft - OpenRC scripts
# Copyright (C) 2017-2019 João Brázio [joao@brazio.org]
#
# For 1GB machines
#MINHEAP=128M
#MAXHEAP=1024M
@ansrivas
ansrivas / implementation.rs
Created January 28, 2020 21:30
Rust tokio-postgres example custom ToSql and FromSql implementation
use postgres_types::{Type, ToSql, FromSql, IsNull, to_sql_checked};
use bytes::BytesMut;
use std::error::Error;
#[derive(Debug)]
struct RawValue<'a> {
type_: Type,
raw: Option<&'a [u8]>,
}
@penglei
penglei / a-qemu-install-debian-arm64.sh
Last active April 5, 2023 09:07
run qemu-aarch64 on macOS
#!/bin/bash
#qemu-img create -f qcow2 disk.qcow2 20G
#qemu-img create -f qcow2 varstore.img 128M
debian_iso=debian-9.6.0-arm64-xfce-CD-1.iso
qemu-system-aarch64 -smp cpus=6 -M virt -cpu max -m 2G -nographic \
-drive file=QEMU_EFI.img,if=pflash,format=raw \
-drive file=varstore.img,if=pflash \
-drive file=disk.qcow2,if=virtio \
-drive file=$debian_iso,if=virtio,format=raw
@vesper8
vesper8 / default.conf
Created July 6, 2018 03:17
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@joegoggins
joegoggins / install and add gcc arm to PATH.sh
Last active December 12, 2022 06:59
How I installed GCC ARM on my Mac 10.9 Mac Book Pro
# Download the file manually from here https://launchpad.net/gcc-arm-embedded
# Note: `curl` command doesn't work
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2"
# double click it to unzip it
# Make a place to install it to
mkdir /usr/local/gcc_arm
# Move the unzipped stuff there.
@todgru
todgru / starttmux.sh
Last active May 27, 2024 08:20
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"