Skip to content

Instantly share code, notes, and snippets.

Avatar
🐍
Can Has Status! Working on the Pythons

Jon Davis ShakataGaNai

🐍
Can Has Status! Working on the Pythons
View GitHub Profile
@ShakataGaNai
ShakataGaNai / docker-compose.yml
Created Feb 27, 2019
Docker Compose for GitLab EE
View docker-compose.yml
gitlab:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'gitlab.mycompany.tld'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.mycompany.tld'
# https://docs.gitlab.com/omnibus/settings/ssl.html
letsencrypt['enable'] = true
letsencrypt['auto_renew'] = true
@ShakataGaNai
ShakataGaNai / list_gcp_iprange.py
Last active Jan 21, 2020 — forked from n0531m/list_gcp_iprange.sh
Google Cloud Platform : ip address range
View list_gcp_iprange.py
#!/usr/local/bin/python3.6
import dns.resolver
import re
def main():
v4 = []
v6 = []
v4, v6 = que('_cloud-netblocks.googleusercontent.com')
for o4 in v4:
print(o4)
View is_your_password_safe.py
#!/usr/bin/python
from getpass import getpass
import hashlib
import requests
import sys
import re
passd = getpass('Gimme your password: ')
hash = hashlib.sha1(passd).hexdigest().upper()
res = requests.get('https://api.pwnedpasswords.com/range/'+hash[0:5])
@ShakataGaNai
ShakataGaNai / mp_wemos_blink.py
Created Jan 29, 2018
A hello world (blinking LED) for Micropython on the Wemos D1 Mini (ESP8266)
View mp_wemos_blink.py
View ebs-autosnap.py
import boto3
import re
import datetime
import time
ec = boto3.client('ec2')
iam = boto3.client('iam')
def backupVols(e):
print("Looking for volumes to backup")
View sample-mackup.cfg
[storage]
engine = file_system
path = Development/MACHINENAME
directory = Mackup
[configuration_files]
@ShakataGaNai
ShakataGaNai / backup.sh
Created Nov 22, 2017
Mackup & Keybase powered CLI Backup
View backup.sh
#!/bin/bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
mackup backup -f
cd $DIR
git add --all
git commit -m "automated backup `date`"
git push
@ShakataGaNai
ShakataGaNai / strip-exif.py
Created Nov 1, 2017
Load every JPG file in the current directory and strip all the exif from it.
View strip-exif.py
from PIL import Image
import re
from os import listdir
from os.path import isfile, join
def clean(f):
image_file = open(f)
image = Image.open(image_file)
data = list(image.getdata())
View keybase.md

Keybase proof

I hereby claim:

  • I am shakataganai on github.
  • I am shakataganai (https://keybase.io/shakataganai) on keybase.
  • I have a public key ASBD1taS5cFXVX0sc9IOHeYf5LGNCaJPV4U4JoLpBUjz7wo

To claim this, I am signing this object:

@ShakataGaNai
ShakataGaNai / lambda-at-edge-headers.js
Last active Sep 19, 2017
A quick demonstration of using Lamba@Edge to inject extra HTTP Security/Cache Headers
View lambda-at-edge-headers.js
'use strict';
exports.handler = (event, context, callback) => {
const response = event.Records[0].cf.response;
const headers = response.headers;
var hr = {
'Strict-Transport-Security': 'max-age=600;',
'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate',
'Pragma': 'no-cache',
'X-LambdaAtEdge': 'true'
You can’t perform that action at this time.