Skip to content

Instantly share code, notes, and snippets.

@pklaus
pklaus / dnsupdate.py
Last active November 14, 2023 23:50
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
#
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
@nconder
nconder / glasshole.bat
Last active March 6, 2018 04:42
glasshole.bat
@echo off
ECHO Created by Opulent Computing
ECHO Version 0.1
ECHO glasshole.bat with Windows Server 2012 R2, 2012, 2008 R2, 2008 DHCP Server.
ECHO This batch fill will block any device with in the a MAC address range from obtaining an IP from the servers.
ECHO We assume you already have a Windows Server 2012 R2, 2012, 2008 R2, 2008 DHCP Server running.
@csik
csik / gist:090b404408cb6b8d1a62
Last active May 16, 2018 00:41
Freeswitch_Install
#!/bin/bash
# FreeSWITCH Installation script for CentOS 5.5/5.6
# and Debian based distros (Debian 5.0 , Ubuntu 10.04 and above)
# Copyright (c) 2011 Plivo Team. See LICENSE for details.
FS_CONF_PATH=https://github.com/plivo/plivoframework/raw/master/freeswitch
FS_GIT_REPO=https://stash.freeswitch.org/scm/fs/freeswitch.git
FS_INSTALLED_PATH=/usr/local/freeswitch
#!/bin/bash
#
# AUTHOR: Paul Miller <[email protected]>
# RE: This relates to a quest: https://github.com/Nuand/bladeRF/issues/386
# PREREQ:
# http://gnuradio.org/redmine/projects/gnuradio/wiki/GRAndDeps
# http://gnuradio.org/redmine/projects/gnuradio/wiki/GRAndBuild
#
ARGS=()
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active February 6, 2025 04:09
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@davidejones
davidejones / get_s3_file.sh
Last active July 17, 2024 17:34
curl get file from private s3 with iam role
#!/bin/bash
instance_profile=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/`
aws_access_key_id=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'`
aws_secret_access_key=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'`
token=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | sed -n '/Token/{p;}' | cut -f4 -d'"'`
file="somefile.deb"
bucket="some-bucket-of-mine"
date="`date +'%a, %d %b %Y %H:%M:%S %z'`"
@dexterlabora
dexterlabora / LICENSE
Last active March 25, 2019 10:14
Cisco Meraki and Spark Demo Flows
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
@jessfraz
jessfraz / boxstarter.ps1
Last active March 4, 2025 09:17
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
#!/usr/bin/env bash
set -eu
for file in "$@"; do
failed=0
dir=$(dirname ${file})
if ! cmp -s <(terraform-docs md ${dir}) "${dir}/README.md"; then
echo "Need to update Terraform docs for: "
echo "${dir}"
echo "Run: terraform-docs md ${dir} > ${dir}/README.md"
@potatoqualitee
potatoqualitee / Save-KBFile.ps1
Last active July 5, 2024 11:31
Download Windows patch files / KB (patchid like KBxxxxx) and save them to disk using PowerShell
function Save-KBFile {
<#
.SYNOPSIS
Downloads patches from Microsoft
.DESCRIPTION
Downloads patches from Microsoft
.PARAMETER Name
The KB name or number. For example, KB4057119 or 4057119.