Skip to content

Instantly share code, notes, and snippets.

View Create-Unix-VM-cloud-init.ps1
<#
Create Unix VM's.
PREREQUISITES:
- A VM that has been installed with an OS that supports cloud-init
- cloud-init is installed on the vm
How it works:
- Asks for a bunch of parameters
- Creates a disk from parent vhdx for speed
@sasha2002
sasha2002 / Documentation.md
Created May 22, 2020 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@sasha2002
sasha2002 / accounts.list
Created Aug 11, 2019 — forked from onlime/accounts.list
imapsync script to migrate multiple IMAP accounts in a row
View accounts.list
# <SRCUSER> <SRCPW> <DSTUSER> <DSTPW>
View gist:ec3be2175e0f471aa9307f2145c6e81a
<!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>
@sasha2002
sasha2002 / UsingSwingClass.java
Created Nov 2, 2018 — forked from jintujacob/UsingSwingClass.java
A java code to implement basic gui for input and output
View UsingSwingClass.java
import javax.swing.JOptionPane;
public class UsingSwingClass {
/**
* Implementinng the input dialog box and show message
*+box
* Something to check on the showMessage dialog box
* JOption.PLAIN_MESSAGE is the one without any icon
*/
public static void main(String[] args) {
@sasha2002
sasha2002 / _service.md
Created May 26, 2016 — forked from naholyr/_service.md
Sample /etc/init.d script
View _service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@sasha2002
sasha2002 / gist:7a17d493d631824be833
Created Oct 6, 2015
Script to block MS telemetry using Mikrotik router
View gist:7a17d493d631824be833
/ip firewall address-list add list=MStelemetry address=111.221.29.177
/ip firewall address-list add list=MStelemetry address=111.221.29.253
/ip firewall address-list add list=MStelemetry address=131.253.40.37
/ip firewall address-list add list=MStelemetry address=134.170.30.202
/ip firewall address-list add list=MStelemetry address=134.170.115.60
/ip firewall address-list add list=MStelemetry address=134.170.165.248
/ip firewall address-list add list=MStelemetry address=134.170.165.253
/ip firewall address-list add list=MStelemetry address=134.170.185.70
/ip firewall address-list add list=MStelemetry address=137.116.81.24
/ip firewall address-list add list=MStelemetry address=137.117.235.16
You can’t perform that action at this time.