Skip to content

Instantly share code, notes, and snippets.

Robert Allen zircote

Block or report user

Report or block zircote

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zircote
zircote / ssh.sh
Created Sep 26, 2011
Convert a AWS PEM into a ssh pub key
View ssh.sh
ssh-keygen -y -f private_key1.pem > public_key1.pub
@zircote
zircote / init_ansible_role.sh
Last active Apr 16, 2019
bash function to create a boilerplate ansible role (I am lazy)
View init_ansible_role.sh
#!/bin/sh
function init_ansible_role {
if [[ ! -n $1 ]]; then
echo no init
return
fi
mkdir -p roles/${1}/{defaults,tasks,files,templates,vars,handlers,meta}
for i in defaults tasks vars handlers meta; do
if [[ ! -f roles/${1}/${i}/main.yaml ]]; then
echo creating file: roles/${1}/${i}/main.yaml
@zircote
zircote / AWS.js
Last active Apr 16, 2019
Google Script for Excel and AWS instance pricing + Reserved Instances
View AWS.js
/**=
* User: zircote
* Date: 16/10/2013
* Time: 08:59
*/
var SERVICE_HOST = 'http://aws.amazon.com'
var data_sources = {
"linux-od": {
@zircote
zircote / monitor.py
Last active Mar 14, 2019
AWS/Celery Monitor
View monitor.py
from boto.ec2.cloudwatch import CloudWatchConnection
from datetime import datetime
from main.settings import AWS_CREDENTIALS, CLOUDWATCH_NAMESPACE
def monitor(app):
cloudwatch = CloudWatchConnection(**AWS_CREDENTIALS)
state = app.events.State()
def get_task(event):
@zircote
zircote / index.php
Created Apr 28, 2012
Bootstrapping Zend Framework 1.x with composer namespaces
View index.php
<?php
/**
* Bootstrap the App in an annonymous function preserving global namespace.
*/
call_user_func(function(){
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH',
realpath(dirname(__FILE__) . '/../application'));
@zircote
zircote / ec2.py
Last active May 15, 2018
fixed yo shit
View ec2.py
#!/usr/bin/env python
'''
EC2 external inventory script
=================================
Generates inventory that Ansible can understand by making API request to
AWS EC2 using the Boto library.
NOTE: This script assumes Ansible is being executed where the environment
View USER.cfg.start-citizen-3.1.0.cfg
r_DisplayInfo = 3
; —————————————————————————————————————————————
; Custom USER.cfg – This is a command in needed to Unlock the Console to accept Commands
Con_Restricted = 0
; This Setting reduces some of the aggressive Bloom Effects that 2.5 has, recommended set to 0 for less blinding lights.
r_OpticsBloom = 0
; This Setting basically sets the basis for your config (1-4) 1 is Low but best performance & 4 is Very High Graphics but most intensive. It sets loads of settings & it’s important it’s at the top of the .cfg so that anything below it overwrites parts of it, 3 gives great quality and performance.
sys_spec = 1
; Remove Maxfps to have a less stable max framerate (but it will be at it’s highest), I suggest setting at an achievable level, slower PCs go for 30, Fast PCs set at your monitors Refresh rate. If unsure delete the line it.
sys_maxfps = 60
@zircote
zircote / task.aurora.py
Created Feb 21, 2018
A proposed implementation of DiscoveryInfo in an Apache Aurora Job.
View task.aurora.py
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
View osx-10.9-setup.md

Mac from scratch

Install Software

Install from App Store

Install from Third-Party Websites

@zircote
zircote / aurora.py
Last active Jul 4, 2017
WIP DataDog check for Apache Aurora
View aurora.py
"""
Aurora Scheduler check
Collects metrics from aurora scheduler.
"""
import requests
from checks import AgentCheck, CheckException
class AuroraCheck(AgentCheck):
You can’t perform that action at this time.