jpartain89
jpartain89
Reputation Top 1%
Justin Partain
11 Snippets  (78th place)
Published
1 Channel
Created
2 Channels
Following
250 points  (123rd place)
Reputation
Junior Code Generator
Serious Code Generator
Junior Popular Coder
Junior Autobiographer
Serious Autobiographer
Master Autobiographer
Junior Snip2Coder
Serious Famous Coder
Junior Wise Coder

Recent Snippets See all snippets by jpartain89

public by jpartain89  188133  0  3  0

keybase.md

keybase.md: keybase.md
### Keybase proof

I hereby claim:

  * I am jpartain89 on github.
  * I am jpartain89 (https://keybase.io/jpartain89) on keybase.
  * I have a public key whose fingerprint is D182 E203 7AA3 39AD 5873  2D81 AF51 1EBA 2248 1781

To claim this, I am signing this object:

```json
{
    "body": {
        "key": {
            "eldest_kid": "0120988e4508ccd7c5df174348c6ac6f2ebfa2fb3cd2b8af46493f07c6919a3886ac0a",
            "fingerprint": "d182e2037aa339ad58732d81af511eba22481781",
            "host": "keybase.io",
            "key_id": "af511eba22481781",
            "kid": "01017ae5a41720a992e2ad53201aecbcde59615fc9924381a7d4a610dc34a5dc13b50a",
            "uid": "e15af7e4f1ec492ad14d335992e7ed19",
            "username": "jpartain89"
        },
        "service": {
            "name": "github",
            "username": "jpartain89"
        },
        "type": "web_service_binding",
        "version": 1
    },
    "ctime": 1468908385,
    "expire_in": 157680000,
    "prev": "a0eae8b47c4b13e0bba9f1818b4624ffc27d9346de01aa1809f1959cb25c28e5",
    "seqno": 7,
    "tag": "signature"
}
```

with the key [D182 E203 7AA3 39AD 5873  2D81 AF51 1EBA 2248 1781](https://keybase.io/jpartain89), yielding the signature:

```
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.53
Comment: https://keybase.io/crypto

yMNdAnicfVJ9TFVlHL430pQvJWm3JMMO1G7zDs97Pu55z0V0OYFm0CQj5PPynnPe
A4ePy/0ECcmgyR8htYaKKzKEKcVc2NLRaHoRxDsXMhlCgiMqSmwJ4ceSD4Xey/S/
1vvPu/f5Pc/ze97ffhdDAnSB+vaUlzqpNwxV+h8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+5OSRhj6kleOhqR0Zz+Nb7I57rnb2muX6Y5Pv50aruVCrD21d6aWJk
mo3SZ3e1rMAmeKcrum3pfO9cquXSc0Xd2sLl9jdTJx0geHNPUfGawy1RB4OXXrn7
bFD6Ow8v3z3yesfNfbHRp9MHfmm90zoa/5UjaxD67rkyk6fjjDvrvDHH/wW/cMEC
=Gj7B
-----END PGP MESSAGE-----

```

And finally, I am proving ownership of the github account by posting this as a gist.

### My publicly-auditable identity:

https://keybase.io/jpartain89

### From the command line:

Consider the [keybase command line program](https://keybase.io/download).

```bash
# look me up
keybase id jpartain89
```


;

public by jpartain89  1277  0  4  0

pia Port Forwarding with openvpn

pia Port Forwarding with openvpn: pia_port_forward
1. wget https://www.privateinternetaccess.com/installer/port_forward.sh
2. chmod +x port_forward.sh
3. Make sure you are connected in one of the gateways that supports port forwarding
3. ./port_forward.sh <user> <password>

It should return something like: { "port": 23423 }

You can then enter this port into your software.

;

public by jpartain89  1668  0  3  0

Update Ubuntu APT Keys

Update Ubuntu APT Keys: updateaptkeys
#!/bin/bash

# Retrieves missing keys from keyserver.ubuntu.com from user-input pubkey.
# The "pubkey" is the string of letters and numbers that apt-get will spit out
# when the private key isn't saved. Its the "public key," thus "pubkey."

echo "Paste in the GPG Keys that need to be retrieved: "

read -r gpgkey

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "$gpgkey"


;

public by Justin P  407986  14  3  0

How to setup notifications FROM Sonarr INTO Slack!!

How to setup notifications FROM Sonarr INTO Slack!!: Sonarr-SlackNotifications
Grab the URL for Incoming WebHooks from Slack:

  https://my.slack.com/services/new/incoming-webhook/

After you complete that step, it looks a little like this:

  https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX

Next create a new bash script with this code:

  #!/bin/bash
  curl -X POST --data-urlencode "payload={\"username\": \"Sonarr\", \"icon_emoji\": \":ghost:\", \"text\": \"$sonarr_eventtype: $sonarr_series_title S$sonarr_episodefile_seasonnumber E$sonarr_episodefile_episodenumbers ($sonarr_episodefile_quality)\"}" $1
  
I personally have mine on the same drive as my Download Directories, so its all in one place - I use OS X FYI.

  /Volumes/Downloader/sonarr/scripts/slack.sh
  
Now set the permissions so it can be executed by everyone, you can modify this if you know what user Sonarr runs under on your system.

  sudo chmod a+x ~/scripts/sonarr/slack.sh
  
Now, go into Sonarr, Settings, "Connect" or the notifications page, and select "Custom Script"

In the Text Fields:

  Name: <Name your notification>
  Path: <put full path to slack.sh here>
  Arguments: <put your Slack Webhook URL here>
  
as in:

  Name: Slack
  Path: /Volumes/Downloader/slack/scripts/slack.sh
  Arguments: https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX
  
Copied and edited liberally from <https://github.com/Sonarr/Sonarr/wiki/Sonarr-notifications-in-Slack-using-curl>

;

public by LB426  1703  0  3  0

Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!

Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!: tmux.cheat
==========================================          ==========================================
             TMUX COMMAND                                        WINDOW (TAB)
==========================================          ==========================================

List    tmux ls                                     List         ^b w
New          -s <session>                           Create       ^b c
Attach       att -t <session>                       Rename       ^b , <name>
Rename       rename-session -t <old> <new>          Last         ^b l               (lower-L)
Kill         kill-session -t <session>              Close        ^b &

==========================================          Goto #       ^b <0-9>
             CONTROLS                               Next         ^b n
==========================================          Previous     ^b p
                                                    Choose       ^b w <name>
Detach       ^b d
List         ^b =                                   ==========================================
Buffer       ^b <PgUpDn>                                         PANE (SPLIT WINDOW)
Command      ^b : <command>                         ==========================================

Copy         ^b [ ... <space> ... <enter>           Show #       ^b q
 Moving         vim/emacs key bindings              Split Horiz  ^b "                --------
 Start          <space>                             Split Vert   ^b %                   |
 Copy           <enter>                             Pane->Window ^b !
Paste        ^b ]                                   Kill         ^b x

==========================================          Reorganize   ^b <space>
             SESSION (Set of Windows)               Expand       ^b <alt><arrow>
==========================================          Resize       ^b ^<arrow>
                                                    Resize x n   ^b <n> <arrow>
New          ^b :new     ^b :new -s <name>
Rename       ^b $                                   Select       ^b <arrow>
List         ^b s                                   Previous     ^b {
Next         ^b (                                   Next         ^b }
Previous     ^b )                                   Switch       ^b o                  other
                                                    Swap         ^b ^o
                                                    Last         ^b ;

============================================
             OTHER COMMAND
============================================
disable status bar  ^b:set -g status off  
mouse scroll        ^b:setw -g mode-mouse on

;