Skip to content

Instantly share code, notes, and snippets.

View Gelob's full-sized avatar

Ryan Gelobter Gelob

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 05:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 11, 2024 10:06
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@arjunnambiartc
arjunnambiartc / devicelogin.py
Last active July 21, 2021 22:35
Login to multiple devices,run multiple commands using paramiko, store the results using xlswriter and send email using Python's smtplib library
#! /usr/bin/python
import os
import getpass
import paramiko
import xlsxwriter
import socket
import re
import sys
import smtplib
@rmadsen
rmadsen / Arista_eAPI_ACL_editor.py
Last active July 28, 2022 08:26
EAPI script to remotely edit an access list across multiple switches using your editor of choice
#!/usr/bin/env python
# Copyright (c) 2014 Arista Networks
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@markberly
markberly / gist:6bf398697a7c4809ee72
Last active February 6, 2020 21:10
Monitor an interface on an Arista Networks EOS powered switch (via Python and eAPI) and uses Growl to provide its status
#!/usr/bin/python
#
# Written by: Mark Berly
import argparse
from jsonrpclib import Server
from gntp.notifier import mini
intf2Monitor = "Ethernet 48"
@azagniotov
azagniotov / download.all.adp.paystubs.js
Last active July 3, 2024 00:03
Downloads all pay-slips from ADP website
/*
This has been tested in Chrome v55.0.2883.95 (64-bit)
1. Log into ADP website using the URL: https://my.adp.com/static/redbox/login.html (Make sure you are NOT in Incognito mode)
2. Open Developer Tools console
3. Run the following code in the console:
*/
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://my.adp.com/v1_0/O/A/payStatements?adjustments=yes&numberoflastpaydates=300');

Configuring SSL certificate/key pairs

Option 1: Generate certificate/key pairs (OpenSSL on Linux)

$ openssl req -new -nodes -x509 -days 365 \
  -out eapi_server_veos1.crt \
  -keyout eapi_server_veos1.key \
  -subj "/C=US/ST=Washington/L=Seattle/O=Arista Networks/OU=Arsita Northwest/CN=veos1.veoslab.lan"