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
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
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 | |
PST_TIME=$(env TZ=America/Los_Angeles date +"%-H") | |
UTC_TIME=$(env TZ=UTC date +"%-H") | |
DST_CHECK=$(($PST_TIME + 8 - $UTC_TIME)) | |
echo "PST Hour:" $PST_TIME | |
echo "UTC Hour:" $UTC_TIME |
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 python3 | |
import sys, logging | |
class FailedValidationException(Exception): | |
pass | |
class ClassToValidate(object): | |
def assert__testing_external(self): | |
return True |
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 python3 | |
from datetime import datetime, timedelta | |
current_time = datetime.now() | |
start_time = current_time.replace(microsecond=0,second=0,minute=0,hour=0)-timedelta(days=1) | |
end_time = current_time.replace(microsecond=0,second=0,minute=0,hour=0)-timedelta(seconds=1) | |
print("Getting All Data from Day Prior") | |
print("Time of invocation:", current_time) | |
print("Start Time Window :", start_time) |
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 | |
CMD="$(basename $0)" | |
usage() { | |
echo "usage: $CMD [-f file | -n name ] [ -i | -u | -s | -r ] [-v] | [-h]" | |
echo '' | |
echo 'systemd service installer' | |
echo 'optional arguments: | |
-h, --help show this help message and exit |
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
class Singleton(object): | |
''' singleton class only allows for one instantiation per python interpreter ''' | |
_instance = None | |
def __new__(class_, *args, **kwargs): | |
''' override __new__ behavior to only return new instance if not previously instantiated ''' | |
if not isinstance(class_._instance, class_): | |
class_._instance = object.__new__(class_, *args, **kwargs) | |
return class_._instance | |
class PrintLogger(Singleton): |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
<div id="tableID" class="table-list-container"> | |
<table class="table-list" data-currentpage="1" style="height:268px;"> | |
<thead> | |
<th><button type="button" class="sort" data-sort="status"><i class="bullet"></i></button></th> | |
<th><button type="button" class="sort" data-sort="timestamp">Date<i class="caret"></i></button></th> | |
<th><button type="button" class="sort" data-sort="jSortNumber">#<i class="caret"></i></button></th> | |
<th><button type="button" class="sort" data-sort="jSortName">Description<i class="caret"></i></button></th> | |
<th><button type="button" class="sort textright" data-sort="jSortTotal">Total<i class="caret"></i></button></th> |
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
const AWS = require('aws-sdk'); | |
const fs = require('fs'); | |
const mime = require('mime-types') | |
const path = require("path"); | |
// Base AWS config. | |
// AWS Reference: Make sure the profile exists in ~/.aws/credentials | |
// See managing access keys: | |
// https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html | |
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console |
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
const AWS = require('aws-sdk'); | |
const fs = require('fs'); | |
const mime = require('mime-types') | |
const path = require("path"); | |
// Base AWS config. | |
// AWS Reference: Make sure the profile exists in ~/.aws/credentials | |
// See managing access keys: | |
// https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html | |
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console |