Skip to content

Instantly share code, notes, and snippets.

View powellnathanj's full-sized avatar

Nathan Powell powellnathanj

  • nathanpowell.org
  • PA
View GitHub Profile
#!/usr/bin/perl -w
use strict;
use Net::LDAP;
my $ldapserver = '';
my $ldapuser = '';
my $ldappasswd = '';
my $ldapfilter = '(uid=*)';
my @ldapattrs = ('cn', 'uid', 'description', 'displayname', 'l', 'mail', 'title', 'mobile', 'telephonenumber', 'facsimileTelephoneNumber',
@marshyski
marshyski / puppetdb-curl.sh
Last active August 11, 2020 09:19
Puppet DB Curl Examples
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]'
curl -sf 'http://localhost:8080/v3/facts'
curl -sf 'http://localhost:8080/v3/nodes'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]'
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]'
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@ishida
ishida / gist:2719962
Created May 17, 2012 16:21
change alias in keystore using keytool
$ keytool -changealias -keystore MY_KEYSTORE_2.jks -alias XXX-XXX-XXX-XXX-XXX -destalias MY_ALIAS