Skip to content

Instantly share code, notes, and snippets.

@meoso
meoso / maclookup.sh
Last active April 26, 2017 18:24
MAC address lookup
#!/bin/bash
# Require 1 parameter
if [ $# -lt 1 ] || [[ ${#1} -lt 6 ]] || [[ "$1" = *"-h"* ]] ; then
echo "MAC lookup tool by njd"
echo "Usage: ${0##*/} MAC"
echo
echo "Dependencies: curl, grep, awk, sed, cut"
echo "Automatically downloads http://standards-oui.ieee.org/oui.txt"
echo
#################################################################################################################
#
# Version 1.4 February 2016
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
# Script to Automated Email Reminders when Users Passwords due to Expire.
#
# Requires: Windows PowerShell Module for Active Directory
#
# For assistance and ideas, visit the TechNet Gallery Q&A Page. http://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27/view/Discussions#content
@meoso
meoso / Example.com-Password-Expiration-Notifications.ps1
Last active April 16, 2025 01:43
PowerShell Active Directory Password Expiration Email Notification
#################################################################################################################
#
# Password-Expiration-Notifications v20220823
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64
#
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/
# https://github.com/titlerequired/public
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
@meoso
meoso / index.html
Last active March 23, 2017 15:20
BootMark template (one of several types) via https://github.com/obedm503/bootmark
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<bootmark fetch="markdown.md" css="https://obedm503.github.io/bootmark/dist/bootmark.min.css" html="{theme:'flatly',prettifyTheme: 'atelier-estuary-light',favicon:'icon.png'}"></bootmark>
</body>
@meoso
meoso / index.html
Created January 20, 2017 20:30
Strapdown-Zeta template via https://github.com/chaitin/strapdown-zeta | Simplest flat markdown renderer with TOC ; Gravizo compatible
<!DOCTYPE html> <html> <title>Page Title</title> <meta charset="utf-8">
<xmp theme="flatly" style="display:none;" src="somefile.md" toc="true">
Markdown content
===
![Alt text](http://g.gravizo.com/g?
digraph G {
nodesep=1.0;
a [label="start"];
b [label="here"];
@meoso
meoso / index.html
Created January 20, 2017 17:05
Strapdown+Navigation template from https://github.com/marshyski/strapdown
<!DOCTYPE html>
<html>
<head>
<title>Strapdown+Navigation</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- amelia bootstrap cerulean cyborg journal paper readable sandstone spacelab united /-->
<meta id='page-params'
theme='amelia'
@meoso
meoso / style.css
Created January 18, 2017 17:28
modified version of flatdoc/theme-white/style.css for dark contrasting menus and blockquotes
/*
Please don't edit this file directly.
Instead, edit the stylus (.styl) files and compile it to CSS on your machine.
*/
/* ----------------------------------------------------------------------------
* Fonts
*/
@import url("//fonts.googleapis.com/css?family=Montserrat:700|Open+Sans:300");
@meoso
meoso / serviceX.sh
Last active March 23, 2017 15:22
synology service script template
#!/bin/sh
path="/path/to"
binary="executable"
parameters="--some-params"
background=1
logpath="/opt/var/log"
case "$1" in
start)
#! /bin/sh
case "$1" in
start)
if ( pidof zerotier-one )
then echo "ZeroTier-One is already running."
else
echo "Starting ZeroTier-One" ;
/opt/bin/zerotier-one -d ;
echo "$(date) Started ZeroTier-One" >> /opt/var/log/zerotier-one.log ;
@meoso
meoso / check-hamachi.sh
Last active April 13, 2021 20:14
bash script to check hamachi status and perform reset tasks if applicable
#!/opt/bin/bash # Synology (requires bash from entware-ng or optware[-ng])
# #!/bin/bash # Other *nix
############# EDIT BLOCK ##############
array_ping_list=("25.1.2.3" "25.2.3.4" "25.3.4.5") #only the IP's expected always-on
array_network_list=("my.net" "my-other.net") #all your networks independent of IP's
log_file=~/check-hamachi.log
#### OS dependent config:
## Linux:
hamachi_service_stop="sudo /etc/init.d/logmein-hamachi stop"