This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import requests | |
import ipaddress | |
import sys | |
parser = argparse.ArgumentParser(description="checks if ip address in fastly ip range") | |
parser.add_argument("ip", metavar='IP', type=ipaddress.IPv4Address, nargs='+', | |
help="ip addresses to check") | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"context" | |
"log" | |
"time" | |
"os" | |
"github.com/gofiber/fiber/v2" | |
"github.com/open-policy-agent/opa/ast" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
def generate_github_action(source, filename): | |
""" | |
Snyk IAC scanning tool currently has the limitation of only scanning | |
a single file at a time. This script will generate the github | |
action steps needed to scan all our IAC code. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lighthouse = require('lighthouse'); | |
const chromeLauncher = require('chrome-launcher'); | |
function launchChromeAndRunLighthouse(url, opts, config = null) { | |
return chromeLauncher.launch({chromeFlags: opts.chromeFlags}).then(chrome => { | |
opts.port = chrome.port; | |
return lighthouse(url, opts, config).then(results => { | |
// use results.lhr for the JS-consumable output | |
// https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts | |
// use results.report for the HTML/JSON/CSV output as a string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import datetime | |
import random | |
import socket | |
import ssl | |
import string | |
import time | |
import traceback | |
from urllib.parse import urlparse | |
from pprint import pprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import subprocess | |
import linecache | |
import os | |
import sys | |
from pprint import pprint | |
import tempfile | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/src/st master ✗ 5m ◒ | |
▶ cat ~/.xprofile | |
xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 & | |
~/src/st master ✗ 6m ◒ | |
▶ cat ~/.xinitrc | |
[ -f ~/.xprofile ] && . ~/.xprofile | |
exec nitrogen --restore & | |
exec slstatus & | |
exec dwm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("o hai") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import github3 | |
from os import environ as env | |
client = github3.GitHubEnterprise(env['GH_ENDPOINT'], token=env['GH_TOKEN']) | |
for repository in client.iter_all_repos(): | |
if repository: | |
print("{}/{}".format(repository.owner, repository.name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tarfile | |
__MAX_SIZE_THRESHOLD = 10240000 # ~10MB | |
def is_dotfile(path): | |
return (os.path.isfile(path) and | |
os.path.basename(path).startswith('.') and | |
os.stat(path).st_size < __MAX_SIZE_THRESHOLD) |
NewerOlder