NOTE
You may not need local branches for all pull requests in a repo.
To fetch only the ref of a single pull request that you need, use this:
git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
""" | |
Code adapted from and inspired by http://blog.ranman.org/cleaning-up-aws-with-boto3/. | |
""" | |
import os | |
import re | |
from datetime import datetime, timedelta | |
import boto3 | |
NOTE
You may not need local branches for all pull requests in a repo.
To fetch only the ref of a single pull request that you need, use this:
git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
ActiveRecord cheat sheet / EXAMPLES | |
INSTALL | |
======= | |
$ gem install activerecord | |
in GEMFILE: gem ‘activerecord’ | |
REQUIRE | |
======= | |
require ‘active_record’ |
This script can help you find and remove unused AWS snapshots and volumes.
There is hardcoded list of regions that it searches, adjust the value to suit your needs.
Use snapshot.py snapshot-report
to generate report.csv
containing information about all snapshots.
snapshot.py snapshot-cleanup
lets you interactively delete snapshot if it finds it is referencing unexisting resources.
./snapshots.py --help
class Foo | |
class << self | |
def exec | |
something | |
rescue => ex | |
ex.message | |
end | |
def something | |
"something" |
{# style 1 - long form #} | |
{% if filepath == '/var/opt/tomcat_1' %} | |
{% set tomcat_value = tomcat_1_value %} | |
{% else %} | |
{% set tomcat_value = tomcat_2_value %} | |
{% endif %} | |
{# style 2 - short form #} | |
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
<?xml version="1.0" encoding="UTF-8"?> | |
<AttributeResolver | |
xmlns="urn:mace:shibboleth:2.0:resolver" | |
xmlns:sec="urn:mace:shibboleth:2.0:security" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="urn:mace:shibboleth:2.0:resolver http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd | |
urn:mace:shibboleth:2.0:security http://shibboleth.net/schema/idp/shibboleth-security.xsd"> | |
<!-- ========================================== --> |