I hereby claim:
- I am aduzsardi on github.
- I am aduzsardi (https://keybase.io/aduzsardi) on keybase.
- I have a public key ASBApsrc0qMPLOjVvuO7OyOEqxoMmvc_-nQXstKIYt7n-go
To claim this, I am signing this object:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; | |
# Info http://osxdaily.com/2015/11/16/howto-flush-dns-cache-os-x-elcap/ |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
# Info 'man 7 regex' | |
POSIX Basic Regular Expressions (BRE) | |
+ - ordinary char | |
? - ordinary char | |
| - ordinary char | |
\{\} - special chars | |
{} - regular chars | |
\(\) - special | |
() - regular |
<LDAP> | |
# recomanded setting for URL is your AD domain FQDN , enable TLS and set the correct TLSCACertFile | |
URL ldap://10.100.10.100 | |
# Bind DN for active directory can be | |
# a DN like CN=User01,OU=test,DC=domain,DC=lan | |
# user@DOMAIN , where DOMAIN is your ActiveDirectory NetBios domain name | |
# [email protected] , where domain.lan is your ActiveDirectory FQDN , this is called UPN or userPrincipalName | |
BindDN CN=User01,OU=test,DC=domain,DC=lan | |
Password P@ssw0rd | |
Timeout 15 |
#!/bin/bash | |
# Alex Duzsardi @aduzsardi | |
# made it more portable by using 'tr' instead of 'dos2unix' | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: ./$0 tab-delimited-file.txt" | |
else | |
tr -d '\r' < "$1" | sed -r -e 's/\t/","/g' -e 's/^/"/g' -e 's/\s+(")/\1/g' -e 's/(\s+)?$/"/g' > "$1".csv | |
fi |
# Match email address from list of Name,Email , email can be with country code domain or company domain. | |
# List of names (file names.txt) | |
Cameron Carr [email protected] | |
Tim Burgess [email protected] | |
Wanda Dyer [email protected] | |
Bella Dowd [email protected] | |
Madeleine Mills [email protected] | |
grep -Eo '(\w+\.)?\w+@\w+\.[a-z]{2,3}$' names.txt |
Note for Windows users on 64-bit systems | |
Progra~1 = 'Program Files' | |
Progra~2 = 'Program Files(x86)' |
function tsv2csv() { | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: ./$0 tab-delimited-file.txt" | |
else | |
tr -d '\r' < "$1" | sed -r -e 's/\t/","/g' -e 's/^/"/g' -e 's/\s+(")/\1/g' -e 's/(\s+)?$/"/g' > "$1".csv | |
fi | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Create 3 EC2 instances - add tag=consul_join , value=cluster to each | |
# EC2 cmds (as root): | |
# ----- | |
apt-get -yqq install unzip &>/dev/null | |
cd /tmp | |
curl -sLo consul.zip https://releases.hashicorp.com/consul/1.0.2/consul_1.0.2_linux_amd64.zip | |
unzip consul.zip >/dev/null | |
chmod +x consul |