This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import yaml | |
import pprint | |
def main(args): | |
if len(args) >= 2: | |
for i in args[1:]: | |
s = open(i).read() | |
pprint.pprint(yaml.load(s)) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
import os | |
import re | |
from glob import glob | |
SUDOERS_D = '/etc/sudoers.d' | |
SUDOERS_FILE = '/etc/sudoers' | |
__doc__ = "Prints all sudoers entries (users/groups) found in /etc/sudoers.d & /etc/sudoers, and their assigned rules to stdout" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facter.add(:java) do | |
confine :kernel => "Linux" | |
regexp = /\d+\.(\d+)\./ | |
setcode do | |
java = {} | |
java['path'] = Facter::Core::Execution.which('java') | |
if java['path'] != nil | |
p = java['path'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"commands": { | |
"01ecsupdate": {"command": ".os-config/scripts/ecs-agent-update.sh"}, | |
"99completed": {"command": "logger -t update-ecs-agent completed"} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ECS_INIT_VER=`curl -sS http://localhost:51678/v1/metadata | jq -r .Version` | |
echo $ECS_INIT_VER | grep '1.6.0' | |
if [ $? -eq 0 ] | |
then | |
echo "Found outdated version of ECS agent" | |
NEEDS_UPDATE=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import textwrap | |
WIDTH = 79 | |
def main(argv): | |
if len(argv) != 2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# Chiliproject to Redmine converter | |
# ================================= | |
# | |
# This script takes an existing Chiliproject database and | |
# converts it to be compatible with Redmine (>= v2.3). The | |
# database is converted in such a way that it can be run multiple | |
# times against a production Chiliproject install without | |
# interfering with it's operation. This is done by duplicating |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir sslfix | |
cd sslfix | |
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.1e-3ubuntu1.2.dsc | |
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.1e.orig.tar.gz | |
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.1e-3ubuntu1.2.debian.tar.gz | |
sudo apt-get build-dep openssl | |
dpkg-source -x openssl_1.0.1e-3ubuntu1.2.dsc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; --COPYRIGHT--,BSD_EX | |
; Copyright (c) 2012, Texas Instruments Incorporated | |
; All rights reserved. | |
; | |
; Redistribution and use in source and binary forms, with or without | |
; modification, are permitted provided that the following conditions | |
; are met: | |
; | |
; * Redistributions of source code must retain the above copyright | |
; notice, this list of conditions and the following disclaimer. |
NewerOlder