Skip to content

Instantly share code, notes, and snippets.

View kanr's full-sized avatar
🤖
Resistance Is Futile

Connor kanr

🤖
Resistance Is Futile
View GitHub Profile
@kanr
kanr / aws-ssm-automation-packer.yaml
Created December 5, 2020 16:45
Aws Systems Manager Automation Packer
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# 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.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
@kanr
kanr / install_jekyll.sh
Created November 27, 2018 22:10
bash script to install system dependencies and create a new jekyll site on debian linux.
#!/bin/bash
$SiteName = "demo-test"
# Install dependencies on debian linux
apt-get update -y && apt-get upgrade -y
apt-get install -y ruby gem rub-dev gcc g++ make
# TODO add Darwin and others...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kanr
kanr / reclaimWindows10.ps1
Created August 3, 2018 05:36 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.1, 2018-07-23
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@kanr
kanr / vagrant-shutdown.sh
Created July 31, 2018 17:22
Vagrant global halt command
#! /bin/bash
#Background: I have followed the naming convention of "vagrant-*" when creating vagrant projects. This gives me the ability to easily loop over those folders to execute a command.
for d in ./vagrant*/ ; do (cd "$d" && vagrant halt); done
@kanr
kanr / explainshell.md
Last active July 11, 2018 22:50
Increase your command line skills by inspecting shell scripts with this tool

Learning how to work with computers at the Command Line Interface (CLI) level is crucial for doing tasks that would be tedius if done through manual effort or search.

Explain Shell is a fantastic tool for taking any unix shell command or script and inpecting it. What explain shell does is display the source documentaiton and help information relevant to each character and string in your command or script.

Take this script as an example. find . -type f -mindepth 2 -exec mv -i -- {} . \; It's half symbols, which is not very human readable and requires prior knowledge to be able to read, let alone leverage to solve a problem that saves you time and effort. Getting a better sense of all the options and flags available in the linux shell commands will pay dividends in your ability to open up a terminal and control systems.

In recent years Microsoft has thrown open the doors to open source software and [Linux i

Sh3cAVZ4DgJrpUp6WTfqoaUMgBZ89VpWTq