Skip to content

Instantly share code, notes, and snippets.

@zircote
zircote / reports.txt
Created May 10, 2011
phpcs report types
View reports.txt
phpcs --standard=tests/build/phpcs.xml --report=summary .
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE ERRORS WARNINGS
--------------------------------------------------------------------------------
/usr/local/zend/apache2/htdocs/project/application/Bootstrap.php 1 4
...2/htdocs/Project/application/controllers/ActivityController.php 3 1
...
@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 / README.md
Created May 22, 2020 — forked from Ceralor/README.md
Simple Thermometer
View README.md

thermostat

Simple elegant thermometer card for Home Assistant. Tweak as-needed!

@zircote
zircote / munin-plugin-redis_
Last active May 21, 2020
Munin Plugin for redis requiring only `redis-cli`
View munin-plugin-redis_
#!/usr/bin/env bash
#
# Copyright 2013 Robert Allen
#
# 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
@zircote
zircote / AWS.js
Last active Jan 31, 2020
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 / init_ansible_role.sh
Last active Jan 8, 2020
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 / 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
You can’t perform that action at this time.