Skip to content

Instantly share code, notes, and snippets.

View kfatkin's full-sized avatar

Kevin Fatkin kfatkin

View GitHub Profile
@kfatkin
kfatkin / gist:9ba9df697195e1634b2e7d5d62bee2f3
Created May 11, 2021 18:43 — forked from qingl97/gist:44419227ae5eac116ace
Reset local repository to be just like remote repository HEAD

Setting your branch to exactly match the remote branch can be done in two steps:

git fetch origin
git reset --hard origin/master

If you want to save your current branch's state before doing this (just in case), you can do:

git commit -a -m "Saving my work, just in case"
git branch my-saved-work
gst-launch-1.0 pulsesrc ! pulsesink
@kfatkin
kfatkin / aws-sqs.policy
Created May 14, 2020 19:03 — forked from marcelog/aws-sqs.policy
SQS Policy to allow an S3 bucket to publish messages
{
"Version": "2012-10-17",
"Id": "arn:aws:sqs:YOUR-AWS-REGION:YOUR-AWS-ACCOUNT-ID:YOUR-QUEUE-NAME/SQSDefaultPolicy",
"Statement": [
{
"Sid": "example-statement-ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@kfatkin
kfatkin / docker-cheat-sheat.md
Created November 22, 2019 20:42 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@kfatkin
kfatkin / vpc.yaml
Created January 8, 2019 14:41 — forked from milesjordan/vpc.yaml
Cloudformation template for a VPC with ipv6, with public and private subnets, calculating the subnet ipv6 CIDR blocks on the fly.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Public VPC and subnets
Resources:
#
# Public VPC
#
PublicVpc:
@kfatkin
kfatkin / threading_csv.py
Created March 5, 2018 16:03 — forked from ktbyers/threading_csv.py
Netmiko Threading from a CSV file
import csv
import threading
from Queue import Queue
from getpass import getpass
from netmiko import ConnectHandler
from datetime import datetime
USER = 'pyclass'
PASSWORD = getpass()