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
CREATE EXTERNAL TABLE `cf_logs`( | |
`cachecachestatus` string COMMENT 'from deserializer', | |
`cacheresponsebytes` int COMMENT 'from deserializer', | |
`cacheresponsestatus` int COMMENT 'from deserializer', | |
`cachetieredfill` boolean COMMENT 'from deserializer', | |
`clientasn` int COMMENT 'from deserializer', | |
`clientcountry` string COMMENT 'from deserializer', | |
`clientdevicetype` string COMMENT 'from deserializer', | |
`clientip` string COMMENT 'from deserializer', | |
`clientipclass` string COMMENT 'from deserializer', |
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 bash | |
set -e | |
echo "Waring, this script will remove chat history and prefrences from Skype for Business" | |
read -p "Press enter to continue" | |
current_user=`whoami` | |
#going into directory where app stuff is stored | |
cd /users/$current_user/library | |
pwd |
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
regionlist=($(aws ec2 describe-regions --query Regions[*].RegionName --output text)) | |
for region in "${regionlist[@]}" | |
do | |
aws --region $region ec2 describe-instances --output text --query 'Reservations[*].Instances[*].[Tags[?Key==`Name`] | [0].Value,PrivateIpAddress,InstanceId,State.Name,InstanceType,Placement.AvailabilityZone,LaunchTime]' --filters 'Name=tag:Name,Values=*' | |
done |
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
Open Admin command prompt: bcdedit /set {current} safeboot minimal | |
Restart to BIOS and set to AHCI | |
Restart. Windows will boot into safe mode and will update the driver. | |
Open Admin command prompt: bcdedit /deletevalue {current} safeboot | |
Restart to boot Windows Normally. |
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/bash | |
for i in $( ls *.iso ); do | |
filename=$i | |
base=${filename%.*} | |
echo processing $filename | |
/cygdrive/c/Program\ Files\ \(x86\)/MakeMKV/makemkvcon.exe mkv iso:$filename 0 processed/ | |
mv processed/title00.mkv processed/$base.mkv | |
echo done | |
done |
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 bash | |
USERNAME=`cat config/database.yml | grep username | awk {'print$2'}` | |
PASSWORD=`cat config/database.yml | grep password | awk {'print$2'}` | |
HOST=`cat config/database.yml | grep host | awk {'print$2'}` | |
DATABASE=`cat config/database.yml | grep database | awk {'print$2'}` | |
mysql -h $HOST -u $USERNAME -D $DATABASE -p$PASSWORD |
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
require 'sinatra' | |
require 'multi_json' | |
class App < Sinatra::Application | |
configure do | |
# Don't log them. We'll do that ourself | |
set :dump_errors, false | |
# Don't capture any errors. Throw them up the stack | |
set :raise_errors, 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
def setup_dynamo | |
options = { | |
:table_name => 'servers', | |
:attribute_definitions => [ | |
{ | |
:attribute_name => 'uid', | |
:attribute_type => 'S' | |
}, | |
{ | |
:attribute_name => 'private_ip', |
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
:access_key_id: 'ACCESS_KEY' | |
:secret_key: 'SECRET_KEY' |
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
require "minitest/autorun" | |
# Each member of a Cartesian Array corresponds to the selection of one element each in every one of those sets. | |
# http://en.wikipedia.org/wiki/Cartesian_product | |
class CartesianArray < Array | |
# CartesianArray.new([0,1], [a,b], etc) | |
def initialize(*args) | |
super args |
NewerOlder