Skip to content

Instantly share code, notes, and snippets.

View michaelkeevildown's full-sized avatar

Michael Down michaelkeevildown

View GitHub Profile
@michaelkeevildown
michaelkeevildown / create-aws-user.txt
Created July 6, 2016 08:49
Create New AWS Ubuntu User
## Taken from: http://www.brianlinkletter.com/how-to-set-up-a-new-userid-on-your-amazon-aws-server-instance/
Create a new userid, with password
We will create a new account with userid brian. If you run into any trouble, consult the Amazon AWS documentation. To create the new account, first login to your AWS server with a command similar to:
Laptop:$ ssh -i ~/Documents/Ubuntu-2-keypair.pem ubuntu@54.175.34.164
Then create the new user brian (or your choice) using the command:
ubuntu@AWS:$ sudo adduser brian
@michaelkeevildown
michaelkeevildown / ubuntu-accounts.txt
Created July 6, 2016 08:48
Ubuntu Disable and Enable users
### Disable User
`sudo usermod -L -e 1 [username]`
### Enable user
`sudo usermod -U -e "" [username]`
@michaelkeevildown
michaelkeevildown / scroll.py
Created July 1, 2016 14:39
Elasticsearch Python Scroll Script
########################################
# Tested on Elasticsearch Version: 2.x #
########################################
from elasticsearch import Elasticsearch
import certifi
index_name = 'index name here'
index_type = 'index type here'
@michaelkeevildown
michaelkeevildown / keybase.md
Last active September 20, 2016 16:33
Keybase Public Identity

Keybase proof

I hereby claim:

  • I am michaelkeevildown on github.
  • I am mkd (https://keybase.io/mkd) on keybase.
  • I have a public key whose fingerprint is 8A8A 2964 F4C5 4F97 EC17 7D0E 2E5B 95B6 8D3D 6F7B

To claim this, I am signing this object:

@michaelkeevildown
michaelkeevildown / alienthreat-api-request.txt
Last active June 15, 2016 08:50
AlienTheat API Example
/api/v1/pulses/activity/?modified_since=2016-04-25T22:49:03.704867&limit=10&page=1
{
"count": 487,
"next": "https://otx.alienvault.com/api/v1/pulses/activity?page=2",
"previous": null,
"results": [
{
"id": "5760336e2957b90134ede223",
"name": "Intrusion into the Democratic National Committee",
@michaelkeevildown
michaelkeevildown / opennlp-trainer.txt
Last active September 15, 2022 23:49
OpenNLP TokenNameFinderTrainer Example
# tested on opennlp 1.5.3
# download here: http://apache.mirror.anlx.net/opennlp/opennlp-1.5.3/apache-opennlp-1.5.3-bin.zip
./bin/opennlp TokenNameFinderTrainer \
-lang en \
-encoding utf-8 \
-iterations 50 \
-type person \
-model names.bin \
-data test-data-names.txt
@michaelkeevildown
michaelkeevildown / ssl-transmission-nginx.conf
Created June 13, 2016 18:05
SSL Transmission Nginx Config
server {
listen 80 default_server;
server_name domain.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 default_server;
server_name domain.com;
@michaelkeevildown
michaelkeevildown / finder-cleanup.sh
Created June 13, 2016 17:44
Clean Up Finder's "Open With" Menu
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
# branch_name = New branch not MASTER e.g. new_dev
git checkout {branch_name}
git merge -s ours master
git checkout master
git merge {branch_name}
@michaelkeevildown
michaelkeevildown / stop-itunes.sh
Created June 13, 2016 17:41
Stop iTunes Opening on OSX when hitting Play button on Keyboard
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist