Skip to content

Instantly share code, notes, and snippets.

@fcenobi
fcenobi / zerotier_rules_example.ztrd
Created May 23, 2019 21:58 — forked from adamierymenko/zerotier_rules_example.ztrd
An example of what an advanced ZeroTier network rule set might look like
# This is an example from a work in progress, so final versions might
# be slightly different. Don't use as a guide after release!
# Define rule set macros
# Whitelist a TCP destination port on the network. Use this as a template to
# make your own rule sets for more advanced criteria like tag matches, etc.
# This works for both IPv4 and IPv6. Add an ethertype match to restrict it to
# one or the other.
macro tcp_whitelist_dest_port($port)
@fcenobi
fcenobi / README-create-debian-startup-script.md
Created June 8, 2019 22:54 — forked from drmalex07/README-create-debian-startup-script.md
An example of how to create a init.d script in Debian, using dependency booting. #debian #init.d #lsb-script #startup-script
@fcenobi
fcenobi / smtp-test.ps1
Created July 21, 2019 17:50 — forked from jpoehls/smtp-test.ps1
SMTP Test Script (in PowerShell)
$smtp = New-Object System.Net.Mail.SmtpClient
$smtp.Host = "127.0.0.1"
$smtp.Port = 587
$creds = New-Object System.Net.NetworkCredential
# $currentCreds = Get-Credential
$creds.Domain = ""
$creds.UserName = "my_user" # $currentCreds.UserName
$creds.Password = "my_pass" # $currentCreds.GetNetworkCredential()
wget -c "https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn" -O /boot/netboot.xyz.lkrn && \
cat > /etc/grub.d/40_custom <<EOF
#!/bin/sh
exec tail -n +3 \$0
menuentry 'netboot.xyz' {
set root='hd0,msdos1'
linux16 /netboot.xyz.lkrn
}
EOF
update-grub
@fcenobi
fcenobi / httpd.service
Created November 26, 2019 01:05 — forked from blacksaildivision/httpd.service
SystemD (systemctl) script for managing Apache httpd compiled from source
[Unit]
Description=The Apache HTTP Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/apache2/bin/apachectl -k start
ExecReload=/usr/local/apache2/bin/apachectl -k graceful
ExecStop=/usr/local/apache2/bin/apachectl -k graceful-stop
PIDFile=/usr/local/apache2/logs/httpd.pid
@fcenobi
fcenobi / new_guac_builder_0.9.9.v2.sh
Created December 1, 2019 04:45 — forked from larencejg/new_guac_builder_0.9.9.v2.sh
Install script for Guacamole 0.9.9 on Ubuntu 15.10 with Tomcat8, Mysql 5.1.38 and a script to notify when public IP changes
#!/bin/bash
# define some variables
guac_version=0.9.9
mysql_version=5.1.38
mysql_root_password=<MYSQL_ROOT_PASSWORD>
mysql_user_password=<MYSQL_USER_PASSWD> #used by guacamole
server_name=<HOSTNAME> #host part of server's FQDN
server_domain=<DOMAIN> #domain part of server's FQDN
@fcenobi
fcenobi / setenv.sh
Created December 14, 2019 21:45 — forked from patmandenver/setenv.sh
Tomcat8 setenv.sh
#
# Cutom Environment Variables for Tomcat
#
############################################
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
export PATH=${JAVA_HOME}/bin:${PATH}
############################################
#
# JAVA_OPTS
@fcenobi
fcenobi / index.html
Created December 15, 2019 00:23 — forked from terrancesnyder/index.html
Socket io + static file serving with connect
<!-- This should be served by your server -->
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost');
socket.on('news', function (data) {
console.log(data);
socket.emit('my other event', { my: 'data' });
});
</script>
@fcenobi
fcenobi / Generic Volume License Key.txt
Created January 3, 2020 00:22 — forked from CHEF-KOCH/Generic Volume License Key.txt
Microsoft Office 2019 RTM RETAIL Direct Links for Download
https://docs.microsoft.com/en-us/DeployOffice/vlactivation/gvlks
=================================================================
Office Professional Plus 2019 NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
Office Standard 2019 6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK
Project Professional 2019 B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B
Project Standard 2019 C4F7P-NCP8C-6CQPT-MQHV9-JXD2M
Visio Professional 2019 9BGNQ-K37YR-RQHF2-38RQ3-7VCBB
Visio Standard 2019 7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2
Access 2019 9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT
Excel 2019 TMJWT-YYNMB-3BKTF-644FC-RVXBD
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="author" content="HKLCF">
<title>Cloudflare API (List DNS record)</title>
</head>
<body>
<div id="result"></div>