Skip to content

Instantly share code, notes, and snippets.

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@pulsar256
pulsar256 / my_hetzner_xen_setup.md
Last active February 9, 2023 22:20
Hetzner Xen + v4 Subnet + v6 Subnet Setup HowTo

Hetzner Primary IPv4 IP + IPv4/2x Subnet + "Non-Routed" IPv6/64 Subnet HowTo

... so I do not forget the next time I have to figure this stuff out. And perhaps to help other poor souls fiddling with v6/v4 xen setups in a Hetzner network environment.

Basic setup

You can basically follow along the Xen Project Beginners Guide.

The short version

Install Debian Wheezy via Hetzner's installimage on the rescue system, the only important part about partitioning is that you have an LVM volume group named vg0 with enough space for your guests' disks.

'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --disable-threaded-gpu-rasterization --disable-quic --disable-gpu --disable-display-list-2d-canvas --disable-new-avatar-menu --disable-3d-apis --disable-about-in-settings --disable-accelerated-2d-canvas --disable-accelerated-jpeg-decoding --disable-accelerated-video-decode --disable-account-consistency --disable-affiliation-based-matching --disable-answers-in-suggest --disable-app-list-dismiss-on-blur --disable-async-dns --disable-background-networking --disable-backing-store-limit --disable-blink-features --disable-blink-scheduler --disable-boot-animation --disable-breakpad --disable-bundled-ppapi-flash --disable-canvas-aa --disable-cast --disable-cast-streaming-hw-encoding --disable-click-delay --disable-client-side-phishing-detection --disable-cloud-import --disable-component-cloud-policy --disable-component-extensions-with-background-pages --disable-component-update --disable-composited-antialiasing --disable-confirmation --disable-contextual-
@eldondev
eldondev / cmd
Last active December 4, 2023 16:33
Because everyone needs a good preseed
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
cp -nv ~/.ssh/id_rsa.pub .
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none
@spences10
spences10 / github-cheat-sheet.md
Last active November 18, 2024 21:37
GitHub Cheat Sheet

Useful Git commands

This is just stuff that I have put down that I find I use a lot of the time for my own reference.

Latest changes from repo to your machine

$ git pull
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Socket::UNIX;
$|++;
my $SOCK_PATH = "/tmp/unix-domain-socket-test.sock";
unlink $SOCK_PATH;
@sergeyignatov
sergeyignatov / nginx config
Last active March 14, 2023 16:47
zabbix oauth
server {
listen 80;
return 301 https://zabbix.domain.com$request_uri;
}
server {
listen 443 ssl;
server_name zabbix zabbix.domain.com;
access_log /var/log/nginx/zabbix.log;
error_log /var/log/nginx/zabbix.error;
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 18, 2026 23:37
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@dtmilano
dtmilano / colors
Created November 26, 2019 01:31
Shows terminal colors
#! /bin/bash
n=32
arg=setaf
text='Hello World! This is %s %d'
_help()
{
printf 'usage: %s [--help|-H] [--16] [--256] [-t|--tiny] [--background|-b]\n' "$(basename $0)"
exit 0
sensor:
- platform: template
sensors:
k1_humidifier_temperature:
friendly_name: K1 Humidifier Temperature
value_template: '{{ states.fan.k1_nawilzacz.attributes.temperature }}'
unit_of_measurement: '°C'
k1_humidifier_humidity:
friendly_name: K1 Humidifier Humidity
value_template: '{{ states.fan.k1_nawilzacz.attributes.humidity }}'