Skip to content

Instantly share code, notes, and snippets.

View phwelo's full-sized avatar
🌈

Daniel Agans phwelo

🌈
View GitHub Profile
@phwelo
phwelo / speedtest.py
Created August 16, 2019 13:36
Speedtest fork with args pulled out and halo used for progress indication
#!/usr/bin/env python
import os
import re
import csv
import sys
import math
import errno
import signal
import socket
@phwelo
phwelo / sec_grp_scan.py
Last active July 28, 2019 01:09
Search which Security groups have 0.0.0.0/0 incoming, and figure out which instances use them
#!/usr/bin/python3
import boto3
ec2_client = boto3.client('ec2')
def find_in_sg(ip_address):
sg = ec2_client.describe_security_groups()
security_groups = []
for group in sg['SecurityGroups']:
@phwelo
phwelo / jifi.py
Last active June 15, 2024 09:26
jifi rofi jira menu
#!/usr/bin/python3
from jira import JIRA
from rofi import Rofi
from subprocess import Popen, DEVNULL
r = Rofi()
browser_path = "vivaldi-stable"
jira_uri = 'https://company.atlassian.net'
api_token = 'https://id.atlassian.com/manage/api-tokens' # go here and generate one
@phwelo
phwelo / convert_sg_to_hcl.py
Created May 24, 2019 16:37
Python script to describe a Security Group from AWS and convert it into HCL markup. Not the entire file, but the rules only
#!/usr/bin/python3
# Purpose of script:
# Convert a security group to HCL
import boto3
client = boto3.client('ec2')
def describe_sg(security_group):
@phwelo
phwelo / website.py
Created January 16, 2019 14:35
python website runner template
#!/usr/bin/python3
from subprocess import call
website = 'WEBSITE'
call(["xdg-open", website])
@phwelo
phwelo / config.py
Created September 15, 2018 03:06
qutebrowser config
# First day config with qutebrowser
config.load_autoconfig()
# Define Aliases
aliases = {
"q": "quit",
"tabopen": "open -t",
"w": "session-save",
"wq": "quit --save",
"close": "tab-close",
@phwelo
phwelo / config.py
Created September 15, 2018 03:05
qutebrowser config
# First day config with qutebrowser
config.load_autoconfig()
# Define Aliases
aliases = {
"q": "quit",
"tabopen": "open -t",
"w": "session-save",
"wq": "quit --save",
"close": "tab-close",
@phwelo
phwelo / config
Created September 15, 2018 03:02
i3 config file
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#####################################
# Main Config
#
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod1
#
# Configure border style <normal|1pixel|pixel xx|none|pixel>
@phwelo
phwelo / .tmux.conf
Last active September 15, 2018 02:56
Holy hell I finally got the clipboard to work like I want. Save Save Save
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# /!\ do not edit this file
# -- general -------------------------------------------------------------------
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
@phwelo
phwelo / config.py
Created September 14, 2018 20:47
QuteBrowser Config
# Autogenerated config.py
# Documentation:
# qute://help/configuring.html
# qute://help/settings.html
config.load_autoconfig()
# Enable JavaScript.
# Type: Bool
config.set('content.cookies.accept', 'all')