Skip to content

Instantly share code, notes, and snippets.

View ShakataGaNai's full-sized avatar
🐍
Can Has Status! Working on the Pythons

Jon Davis ShakataGaNai

🐍
Can Has Status! Working on the Pythons
View GitHub Profile
[storage]
engine = file_system
path = Development/MACHINENAME
directory = Mackup
[configuration_files]
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")
console.log('Loading event');
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB();
exports.handler = function(event, context) {
console.log("Request received:\n", JSON.stringify(event));
console.log("Context received:\n", JSON.stringify(context));
var tableName = "OurBlogDemo";
var datetime = new Date().getTime().toString();
@ShakataGaNai
ShakataGaNai / cloudbuild.yaml
Last active October 4, 2018 15:19
A sample cloudbuild.yml - details at https://obviate.io/?p=7913
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'gcr.io/yourorg/mystaticsite:$COMMIT_SHA', '.' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'gcr.io/yourorg/mystaticsite:latest', '.' ]
images:
- 'gcr.io/yourorg/mystaticsite:$COMMIT_SHA'
- 'gcr.io/yourorg/mystaticsite:latest'
tags:
- "cloudbuild"
#!/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 / list_gcp_iprange.py
Last active January 21, 2020 15:56 — forked from n0531m/list_gcp_iprange.sh
Google Cloud Platform : ip address range
#!/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)
@ShakataGaNai
ShakataGaNai / mp_wemos_blink.py
Created January 29, 2018 17:07
A hello world (blinking LED) for Micropython on the Wemos D1 Mini (ESP8266)
/*
* HID RFID Reader Wiegand Interface for Arduino Uno
* Originally by Daniel Smith, 2012.01.30 -- http://www.pagemac.com/projects/rfid/arduino_wiegand
*
* Updated 2016-11-23 by Jon "ShakataGaNai" Davis.
* See https://obviate.io/?p=7470 for more details & instructions
*/
#define MAX_BITS 100 // max number of bits
@ShakataGaNai
ShakataGaNai / docker-compose.yml
Created February 27, 2019 01:47
Docker Compose for GitLab EE
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