Skip to content

Instantly share code, notes, and snippets.

View infamousjoeg's full-sized avatar
🙊
I'm really good at keeping secrets.

Joe Garcia infamousjoeg

🙊
I'm really good at keeping secrets.
View GitHub Profile
@infamousjoeg
infamousjoeg / KeepAlive.au3
Last active September 29, 2017 12:24
Keep Alive PC
Opt("GuiOnEventMode",1)
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1); no default tray menuitems
#NoTrayIcon
#include <GUIConstants.au3>
Global $infolabel
Global $sleepTime
Global $pause = 1
@infamousjoeg
infamousjoeg / install_chef_server.sh
Created October 12, 2017 16:18
Quickly install Chef Server for development purposes
#!/bin/bash
apt-get update
apt-get -y install curl
chef_automate_fqdn=$1
# create staging directories
if [ ! -d /drop ]; then
mkdir /drop
fi
@infamousjoeg
infamousjoeg / install_chef_automate.sh
Created October 12, 2017 16:40
Quickly install Chef Automate for development purposes
#!/bin/bash
apt-get update
apt-get -y install curl
chef_server_fqdn=$1
# create downloads directory
if [ ! -d /downloads ]; then
mkdir /downloads
fi
@infamousjoeg
infamousjoeg / aim-ccp-nodejs.js
Created October 18, 2017 15:05
AIM CCP REST Example in Node.js
var http = require("https");
var options = {
"method": "GET",
"hostname": "pvwa.cyberark.local",
"port": "443",
"path": "/AIMWebService/api/Accounts?AppID=AIM-CCP-Test&Safe=T-APP-CYBR-RESTAPI-TESTADD1&Folder=Root&Object=Operating%20System-WinDomain-cyberark.local-Svc_CyberArkREST",
"headers": {
"content-type": "application/json",
"cache-control": "no-cache",
@infamousjoeg
infamousjoeg / EncryptDecryptWebConfig.md
Created December 1, 2017 15:42
Encrypt and Decrypt a web.config file with multiple machine keys for unique-encryption across clusters

Encrypt Command

C:\WINDOWS\Microsoft.NET\Framework\<.Net Version Folder>\aspnet_regiis.exe -pef "<Secton to encrypt in Web.Config>" "<Path to Web.Config>" -prov "DataProtectionConfigurationProvider"

Decrypt Command

C:\WINDOWS\Microsoft.NET\Framework\<.Net Version Folder>\aspnet_regiis.exe -pdf "<Secton to decrypt in Web.Config>" "<Path to Web.Config>"

Note: Only certain sections can be encrypted.

@infamousjoeg
infamousjoeg / PowerShellCore6-Docker.md
Last active January 10, 2018 14:15
How To Run PowerShell Commands in Docker

How To Run PowerShell Commands in Docker

Print "Hello, World!" & Destroy Container

docker run -it microsoft/powershell:latest pwsh -NoProfile -Command 'Write-Host "Hello, World!"'

Jump Directly to PowerShell Core Console

docker run -it microsoft/powershell:latest

@infamousjoeg
infamousjoeg / installposh.sh
Last active January 10, 2018 18:14
Install PowerShell Core on Ubuntu 16.04
# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
# Register the Microsoft Ubuntu repository
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list
# Update apt-get
apt-get update
# Install PowerShell
@infamousjoeg
infamousjoeg / incept-minikube.sh
Created January 29, 2018 16:03 — forked from osowski/incept-minikube.sh
Install Minikube, Kubectl, and Virtualbox on Ubuntu
#Installing VirtualBox
echo "Installing VirtualBox........................"
sudo apt-get install virtualbox
#Installing kubectl https://kubernetes.io/docs/getting-started-guides/kubectl/
echo "Installing kubectl..........................."
wget https://storage.googleapis.com/kubernetes-release/release/v1.4.4/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl
@infamousjoeg
infamousjoeg / widget-ssh-policy.yml
Created February 1, 2018 05:02
Production "Widget" Conjur MAML Policy Example
# Widget Production
- !group &widget_admins widget/admins
# widget/users belongs to widget/admin
- !group &widget_users
id: widget/users
owner: &widget_admins
# devops are can be widget/admins
- !grant
@infamousjoeg
infamousjoeg / README.md
Created February 2, 2018 23:09 — forked from leosuncin/README.md
Install Powerline on Debian/Ubuntu
  1. Install pip sudo apt-get install python-pip or wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
  2. Install powerline sudo pip install powerline-status
  3. Download and install fonts git clone https://github.com/powerline/fonts.git && cd fonts && sh ./install.sh
  4. Add this lines to respective file
    .vimrc

set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
> " Always show statusline