Skip to content

Instantly share code, notes, and snippets.

@64bitint
64bitint / alpine-setup.sh
Created July 20, 2024 17:06 — forked from rupertbenbrook/alpine-setup.sh
Alpine with Docker on Hyper-V Initial Setup
#!/bin/sh
# Initial set up script for Alpine as a Docker host in a Hyper-V VM
# Based on https://wiki.alpinelinux.org/wiki/Docker and https://wiki.alpinelinux.org/wiki/Hyper-V_guest_services
# Tested on Alpine 3.10
# wget -O - https://bit.ly/alpine-docker | sh
# Include community repo and update/upgrade
sed -i '/alpine\/v3.10\/community/s/^#*//g' /etc/apk/repositories
apk update
apk upgrade
@64bitint
64bitint / container_update.sh
Last active March 27, 2022 18:29
Update docker container using watchtower
echo "Select docker container to update using Watchtower:"; select opt in $(docker ps --format "{{.Names}}"); do
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once "$opt"; break; done
@64bitint
64bitint / ProLion.js
Created January 24, 2021 22:28
Blink Theme
t.prefs_.set('color-palette-overrides',["#4c4c4c", "#990000", "#00a600", "#999900", "#2009db", "#b200b2", "#00a6b2", "#bfbfbf", "#666666", "#e50000", "#00d900", "#e5e500", "#0000ff", "#e500e5", "#00e5e5", "#e5e5e5"]);
//t.prefs_.set('foreground-color', "#f2f2f2");
//t.prefs_.set('background-color', "#000000");
//t.prefs_.set('cursor-color', 'rgba(77,77,77,0.5)');
t.prefs_.set('cursor-color', 'rgba(63, 222, 233, 0.5)');
t.prefs_.set('cursor-blink', true);
@64bitint
64bitint / ActiveQueryRelationViaSubquery.php
Last active January 12, 2021 15:05
Yii2 via relations using subqueries
<?php
namespace app\components\db;
use yii\db\ActiveQuery;
use yii\db\Query;
/**
* Class ActiveQueryRelationViaSubquery
*
* This class extends the Yii ActiveQuery class to allow the use
* of sub queries for hasMany relations using the via() method by calling