I hereby claim:
- I am florinasavoaie on github.
- I am florinasavoaie (https://keybase.io/florinasavoaie) on keybase.
- I have a public key ASDHzbcUhziPjeXerU-1JQ_TnBm8653MpymqC9M6hSxTqAo
To claim this, I am signing this object:
#!/bin/bash | |
set +ex | |
URL="https://ip-ranges.amazonaws.com/ip-ranges.json" | |
IPV4_SET_NAME="CloudFront.IPv4" | |
IPV6_SET_NAME="CloudFront.IPv6" | |
I hereby claim:
To claim this, I am signing this object:
import boto3 | |
codecommit = boto3.client('codecommit') | |
codebuild = boto3.client('codebuild') | |
def trigger_build(project, commit, branch): | |
codebuild.start_build(projectName=project, sourceVersion=commit, | |
environmentVariablesOverride=[ | |
{ 'name': 'ENVIRONMENT', 'value': branch, 'type': 'PLAINTEXT' } | |
]) |
#!/usr/bin/env python | |
# This is to be used as an external Puppet fact that can tell you what are the | |
# currently running services (not all units!) on a SystemD machine. | |
from dbus import SystemBus, Interface | |
import re | |
manager = Interface( | |
SystemBus().get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), | |
'org.freedesktop.systemd1.Manager') |
#!/usr/bin/env python | |
# This is to be used as an external Puppet fact that can tell you what are the | |
# leaf packages (the ones that no other package has a dependency on) installed | |
# on RHEL based a machine. | |
import logging | |
from yum import YumBase | |
logging.getLogger('yum.verbose.YumPlugins').setLevel(logging.CRITICAL) |
#!/usr/bin/python | |
""" | |
msysGit to Unix socket proxy | |
============================ | |
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows). | |
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the | |
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other |
-- This function returns the number of working days (Monday to Friday) between 2 dates. | |
-- Tested on PostGreSQL 9.4. | |
-- Usage: SELECT working_days('2016-01-01'::date, '2016-01-31'::date); | |
CREATE OR REPLACE FUNCTION working_days(date, date) RETURNS INT AS | |
$$ | |
SELECT COUNT(days)::INT | |
FROM generate_series($1, $2, '1 day') AS days | |
WHERE EXTRACT(DOW FROM days) NOT IN(0, 6); | |
$$ |
#!/bin/bash | |
IPSET="/usr/sbin/ipset" | |
CURL="/usr/bin/curl" | |
DATE="/bin/date" | |
for VER in 4 6; do | |
URL="https://www.cloudflare.com/ips-v$VER" | |
SET_NAME="CloudFlare.IPv$VER" |