Skip to content

Instantly share code, notes, and snippets.

View bsodmike's full-sized avatar

Michael de Silva bsodmike

View GitHub Profile
@bsodmike
bsodmike / iam-policy-change-user-password.json
Last active March 28, 2018 15:59
Useful AWS IAM Policies
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:ChangePassword"
],
"Resource": [
"arn:aws:iam::*:user/${aws:username}"
@bsodmike
bsodmike / docker-wipe.sh
Created March 27, 2018 04:08
Cronjob script to reset Docker (for running out of space) and Redeploying from AWS ECR
#!/bin/bash
# Copyright (c) 2018 Secure Cloud Solutions // securecloudsolutions.io
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#

Lessons for Life and Business, 19th February 2018

  • Separation of home and state.
  • If you work for me, you'll be my employee first. I'll treat you like family, until you stick that knife in my back.
@bsodmike
bsodmike / encrypt.rb
Last active February 4, 2018 09:28
POC Encryption in Ruby for Discussion at Level1 Techs
# Copyright (c) 2018 Michael de Silva, CTO Secure Cloud Solutions (siliconcloud.tech) & Inertialbox (inertialbox.com)
# Blog: mwdesilva.com // Expertise: desilva.io // Twitter: @bsodmike
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@bsodmike
bsodmike / README-nvr-mining-GTX1070-GTX1080.md
Created February 2, 2018 21:32
OC Nvidia GTX1070 & GTX1080 in Ubuntu 16.04LTS for ZCash mining
nvidia-xconfig --enable-all-gpus --cool-bits=31 --use-display-device="DFP-0" --connected-monitor="DFP-0"
@bsodmike
bsodmike / crontab.sh
Created January 29, 2018 22:28
Cron job to run btrfs scrub on 2x WD Purple 4TB array on custom Ubquiti NVR box.
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
#
# Every Sunday at 0100 hrs
@bsodmike
bsodmike / nintendo-switch.md
Created January 12, 2018 13:53
Mike's Nintendo Switch Bundle from Amazon
@bsodmike
bsodmike / iommu
Last active December 15, 2017 13:06
Asus ROG Strix-E X299 (UEFI 1004) + i9 7920X // IOMMU Groups, with EVGA GTX1070 SC Black installed in PCIEX16/X8_2
IOMMU Group * 00:00.0 Host bridge [0600]: Intel Corporation Sky Lake-E DMI3 Registers [8086:2020] (rev 04)
00:04.0 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.1 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.2 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.3 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.4 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.5 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.6 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:04.7 System peripheral [0880]: Intel Corporation Sky Lake-E CBDMA Registers [8086:2021] (rev 04)
00:05.0 System peripheral [0880]: Intel Corporation Sky Lake-E MM/Vt-d Configuration Registers [8086:2024] (rev 04)
@bsodmike
bsodmike / sony_gear.md
Created November 23, 2017 17:40
Matt's Sony Gear - B&H Pricing

Essential Gear

  • Sony Alpha a7R III Mirrorless Digital Camera // $3,200/-
  • Sony 70-200mm f/2.8 G SSM II Lens // $2,998/-
  • Sony FE 24-70mm f/2.8 GM Lens // $2,198/-
  • Sony FE 12-24mm f/4 G Lens // $1,698/-

For Portraits

  • Sony FE 90mm f/2.8 Macro G OSS Lens // $998/-
  • Sony FE 85mm f/1.4 GM Lens // $1,798/-
@bsodmike
bsodmike / iommu
Created November 11, 2017 02:04
Asus Zenith Extreme X399 (UEFI 0701) w/ "Enumerate all IOMMU in IVRs" Enabled // IOMMU Groups, with EVGA GTX1080Ti FTW3 installed in PCIEX16_3 & ROG (Aquantia) 10G NIC in PCIEX8_2, with Samsung 960 PRO 512GB M.2 NVMe SSD in ROG DIMM.2 (R-Slot) Raw
-+-[0000:40]-+-00.0 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex
| +-00.2 Advanced Micro Devices, Inc. [AMD] Device 1451
| +-01.0 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
| +-01.1-[41]----00.0 Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
| +-01.3-[42]----00.0 Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]
| +-02.0 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
| +-03.0 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
| +-04.0 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
| +-07.0 Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
| +-07.1-[43]--+-00.0 Advanced Micro Devices, Inc. [AMD] Device 145a