Skip to content

Instantly share code, notes, and snippets.

@trick77
trick77 / virt-backup.pl
Last active April 3, 2019 11:31
virt-backup.pl: fixed paths so live images will work again in Ubuntu 14.04
#!/usr/bin/perl -w
#
# 1. Install required dependencies:
# sudo apt-get install -y libxml-simple-perl pv libsys-virt-perl
# 2. Run it like this (assuming the LVM disk size is 20G):
# /virt-backup.pl --vm mykvm --state --snapsize=20G --backupdir /tmp --debug --compress
#
# AUTHOR
# Daniel Berteaud <daniel@firewall-services.com>
#
@atrull
atrull / elite dangerous rare run notes
Last active August 29, 2015 14:12
elite dangerous rare run notes
rare run: from rares clustered to rares clustered in two runs each way - with a cobra mk3 and about 24-28 cargo slots.
based on clusters seen in this : https://www.elitedangeroustrader.co.uk/rares-systems-3d-map/
and a mid-point route from : https://cmdr.club/routes/
we need a cluster of rares to fill the ship
we need 150K or so LY between the clusters of rares.
# mail.example.com should be one of the results of a `dig +short mx example.com`
# Note that your provider might block all port 25.
# If STARTTLS header is missing or mangled, but https://starttls.info/ shows example.com as supporting STARTTLS,
# there might be a downgrade going on.
(echo EHLO foo ; sleep 3) | nc mail.example.com 25
@mattes
mattes / call
Last active December 29, 2020 09:49
Place a call from terminal using your iPhone (Mac OS X Yosemite & iOS 8)
#!/usr/bin/env sh
open "tel://$*"
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@gunthercox
gunthercox / Sonic Screwdriver
Created December 1, 2012 01:13
Arduino code for a sonic screwdriver.
// Sonic Screw Driver
// CONSTANTS AND VARIABLES
const int button2 = 2;
const int button3 = 3;
const int speaker = 4;
const int inputVoltagePin = 6;
const int IREMITTER = 7;
const int IRRECEIVER = 8;
const int LED = 9;