Skip to content

Instantly share code, notes, and snippets.

View Sjeanpierre's full-sized avatar
💭
🤷🏿‍♂️

Stevenson Jean-Pierre Sjeanpierre

💭
🤷🏿‍♂️
View GitHub Profile
@Sjeanpierre
Sjeanpierre / convert.sh
Created September 1, 2015 05:49
iso to mkv conversion, cygwin
#! /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
@Sjeanpierre
Sjeanpierre / switching_from_ahci_to_raid.txt
Created September 6, 2015 05:13
Windows 10, switching from AHCI to RAID after installation
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.
@Sjeanpierre
Sjeanpierre / aws_inventory.sh
Created November 24, 2015 19:42
Report running instances across all regions in AWS
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
@Sjeanpierre
Sjeanpierre / Skype_reset.sh
Created April 30, 2018 21:48
If your Skype for Business Installation on Mac OS keeps crashing on startup run the following.
#!/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
@Sjeanpierre
Sjeanpierre / athena_ddl
Created December 6, 2018 06:26
Cloudflare logs Athena DDL - Create Athena schema for Cloudflare logs
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',