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
$ aws ec2 describe-instance-status --instance-ids i-0538dc72cc1baffdb --region us-east-1 | |
{ | |
"InstanceStatuses": [ | |
{ | |
"InstanceId": "i-0538dc72cc1baffdb", | |
"InstanceState": { | |
"Code": 16, | |
"Name": "running" | |
}, | |
"AvailabilityZone": "us-east-1e", |
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
$ aws ec2 describe-instance-status --instance-ids i-0538dc72cc1baffdb --profile cardpool-dev --region us-east-1 | |
{ | |
"InstanceStatuses": [ | |
{ | |
"InstanceId": "i-0538dc72cc1baffdb", | |
"InstanceState": { | |
"Code": 16, | |
"Name": "running" | |
}, | |
"AvailabilityZone": "us-east-1e", |
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
if [[ "A" == "A" ]]; then | |
sed -r "s/^(#)?labels=.*/labels=PROJECT:Venice;SERVER-STACK:${APP_NAME}-${ENV};\ | |
EC2-TYPE:${INSTANCE_TYPE};VPC:${VPC_ID}/" newrelic.cfg | grep labels | |
fi | |
if [[ "A" == "A" ]]; then | |
sed -r "s/^(#)?labels=.*/labels=PROJECT:Venice;SERVER-STACK:${APP_NAME}-${ENV};\ | |
EC2-TYPE:${INSTANCE_TYPE};VPC:${VPC_ID}/" newrelic.cfg | grep labels | |
fi |
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
SMART Attributes Data Structure revision number: 10 | |
Vendor Specific SMART Attributes with Thresholds: | |
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE | |
1 Raw_Read_Error_Rate 0x000f 115 089 006 Pre-fail Always - 84537541 | |
3 Spin_Up_Time 0x0002 097 097 000 Old_age Always - 0 | |
4 Start_Stop_Count 0x0033 099 099 000 Pre-fail Always - 1158 | |
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 18 | |
7 Seek_Error_Rate 0x000f 078 060 030 Pre-fail Always - 17421499817 | |
9 Power_On_Hours 0x0032 077 077 000 Old_age Always - 20888 | |
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 |
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
import cups | |
import subprocess | |
import time | |
conn = cups.Connection () | |
printid = conn.printFile('ML2580N-1', '/tmp/test.txt', 'test', {}) | |
print printid | |
stop = 0 |
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
from Cheetah.Template import Template | |
test = { | |
'VPCId': 'vpc-1234567', | |
'AssociatePublicIpAddress': 'false', | |
'EC2Subnets': 'subnet-1234567', | |
'ELBSubnets': 'subnet-7654321', | |
'SecurityGroups': 'sg-1234567', | |
'EC2KeyName': 'test', | |
'ManagedSecurityGroup': 'sg-1234567', |
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 | |
http_code=0 | |
function result_handling { | |
case "${http_code}" in | |
"401" | "403" | "404" ) | |
echo "Error: httpd code ${http_code}" | |
;; | |
"200" | "301" ) |
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
FROM centos:7 | |
MAINTAINER Brian Ogden | |
# Not currently being used but may come in handy | |
ARG ENVIRONMENT | |
ENV NODE_VERSION 6.11.1 | |
RUN yum -y update \ | |
&& yum clean all \ | |
&& yum -y install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm \ |
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
import sys | |
from lz4.block import compress as lz4_compress | |
from lz4.block import decompress as lz4_decompress | |
from argparse import ArgumentParser | |
class MozLz4aError(Exception): | |
pass | |
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 | |
PATH_PREFIX=/opt/upload/10k | |
zipinfo -1 100k.zip | grep -v /$ | head -10000 | while read curr_file | |
do | |
curr_dir=$(dirname ${curr_file}) | |
if [[ ! -d ${PATH_PREFIX}/${curr_dir} ]]; then | |
mkdir -p ${PATH_PREFIX}/${curr_dir} |
OlderNewer