Skip to content

Instantly share code, notes, and snippets.

Avatar

Colton Myers basepi

View GitHub Profile
@basepi
basepi / keybase.md
Created Sep 12, 2019
Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am basepi on github.
  • I am basepi (https://keybase.io/basepi) on keybase.
  • I have a public key ASCXUE-RcfTjfT_Fd5GSK9Ql2K-L4un_Wr49hQ52-Q1DqAo

To claim this, I am signing this object:

@basepi
basepi / unsubscribe.py
Created Jan 29, 2019
Unsubscribing from all issues in a repo
View unsubscribe.py
'''
This requires the google chrome web driver on your PATH:
http://chromedriver.chromium.org/downloads
Start google chrome like this (make sure you fix the user-data-dir path):
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Users/<user>/Library/Application\ Support/Google/Chrome --profile-directory=Default --remote-debugging-port=20480
Then add your user, token, and org/repo to the code below and this script will
connect to the running chrome instance (make sure you're logged into Github)
View gist:06531980adf4f9629d82af71e539be20
Flexible Data Gathering
=======================
This module is designed to allow security engineers more flexibility in their
data gathering, without allowing arbitrary command execution from
hubblestack_data. You can think of it like a read-only, sandboxed shell.
It uses yaml files from hubblestack_data, and allows special fdg modules to be
chained together using pipes.
View s3fs.py
# -*- coding: utf-8 -*-
'''
Amazon S3 Fileserver Backend
.. versionadded:: 0.16.0
This backend exposes directories in S3 buckets as Salt environments. To enable
this backend, add ``s3fs`` to the :conf_master:`fileserver_backend` option in the
Master config file.
View 10-netplan-enp0s3.network
[Match]
Name=enp0s3
[Network]
DHCP=ipv4
[Route]
Destination=204.8.230.0/24
Gateway=192.168.1.1
From=192.168.1.160
View 10-netplan-enp0s3.network
[Match]
Name=enp0s3
[Network]
DHCP=ipv4
[Route]
Destination=204.8.230.0/24
Gateway=192.168.1.1
Metric=3
@basepi
basepi / append.sls
Created Feb 9, 2016
file.managed with two appends
View append.sls
append my two files:
file.managed:
- name: /tmp/myfile.txt
- source: salt://template.txt
- template: jinja
View keybase.md

Keybase proof

I hereby claim:

  • I am basepi on github.
  • I am basepi (https://keybase.io/basepi) on keybase.
  • I have a public key whose fingerprint is FBB7 46C3 A43A BFEE 810D E545 6EC5 C787 D71F 663F

To claim this, I am signing this object:

View init.sls
# Setup the application's runit directory
/etc/sv/application:
file.directory:
- mode: 0755
- user: someuser
- group: someuser
- recurse:
- user
- group
- mode