Skip to content

Instantly share code, notes, and snippets.

View OldCrowEW's full-sized avatar
👾
Working from 🏕️

John OldCrowEW

👾
Working from 🏕️
View GitHub Profile
### Keybase proof
I hereby claim:
* I am OldCrowEW on github.
* I am oldcrowew (https://keybase.io/oldcrowew) on keybase.
* I have a public key whose fingerprint is 4540 BB58 68FF 1569 220C 0895 5DBB 0151 C248 D3E9
To claim this, I am signing this object:
@OldCrowEW
OldCrowEW / nginx.conf
Last active August 29, 2015 14:18 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
[root@localhost ~]# cat /etc/vmware/license-ws-110-e1-201404
# VMware software license
StartFields = "Cpt, ProductID, LicenseVersion, LicenseType, LicenseEdition, Field2"
Field2 = "Option, Epoch"
Cpt = "COPYRIGHT (c) VMware, Inc. 1999-2014"
ProductID = "VMware Workstation"
LicenseVersion = "11.0"
LicenseType = "Site"
LicenseEdition = "ws"
Epoch = "2014-04-01"
adduser user
usermod -a -G supergroup user
mkdir /home/user/.ssh/
cat /tmp/ssh-pubkeys/id_rsa_user.pub >> /home/user/.ssh/authorized_keys
chown -R user:user /home/user/.ssh
chmod -R 700 /home/user/.ssh
chmod -R 600 /home/user/.ssh/*
ls -al /home/user/
ls -al /home/user/.ssh/
@OldCrowEW
OldCrowEW / update-task.yml
Created June 23, 2016 16:46
anisble update host and reboot if kernel updated
- name: yum update
yum: name=* state=latest
- name: Check for reboot hint.
shell: if [ `rpm -q 'kernel' |sort --version-sort -r | head -n 1 | awk '{print $1}' | head -n 1` != kernel-`uname -r` ]; then echo "reboot"; else echo "no"; fi
register: reboot_hint
always_run: yes
- name: Rebooting ...
shell: sleep 2 && shutdown -r now "yum kernel update applied"
@OldCrowEW
OldCrowEW / expect file for sosetup
Created June 28, 2016 16:52
answer file for security onion sosetup
#!/usr/bin/expect -f
#
# This Expect script was generated by autoexpect on Tue Jun 28 16:44:12 2016
# Expect and autoexpect were both written by Don Libes, NIST.
#
# Note that autoexpect does not guarantee a working script. It
# necessarily has to guess about certain things. Two reasons a script
# might fail are:
#
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
[Unit]
Description=PlexRequest
After=network.target
[Service]
Environment=ROOT_URL=http://localhost:3000/plexrequests
User=plexrequest
Type=simple
WorkingDirectory=/opt/plexrequests
ExecStart=/usr/local/bin/meteor
Host *.example.internal
ProxyCommand ssh -W %h:%p bastion -F group_vars/site-location/dot_ssh/ssh_config
User aws-user-internal
IdentityFile ~/.ssh/id_rsa_hostname
Host bastion
Hostname example.com
User ec2
IdentityFile ~/.ssh/id_rsa_hostname2
ForwardAgent yes
@OldCrowEW
OldCrowEW / main.yml
Created February 7, 2017 02:35 — forked from rothgar/main.yml
Generate /etc/hosts with Ansible
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
killall iTunes; killall "iTunes Helper"; sudo rm -rf /Applications/iTunes.app/