Skip to content

Instantly share code, notes, and snippets.

View vinyar's full-sized avatar

Mr. Pacman vinyar

  • Launch Consulting
  • Seattle
View GitHub Profile
@vinyar
vinyar / presentation.txt
Last active August 17, 2022 23:46
DevOps presentation notes
DevOps
Wrong ways to think about DevOps:
There is no devops.exe - you can't 'install' DevOps
It's not a THING, it's a way of getting things done
You can't ask the team to 'go get some devops'
DevOps is much more than just Developers and Operations. The term has long ago transended dev and ops. Evangelists know this, but not everyone else
DevOps is a transformational process
@vinyar
vinyar / vagrant and kitchen.yml
Created January 11, 2022 18:28
Quick notes on Vagrantfile and Kitchen.yml settings for VPN connectivity
Muhammad chef issues:
How to setup port forwarding:
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", ip: "172.16.10.101"
config.vm.define "monitor01" do |vm01|
vm01.vm.hostname = "monitor01"
vm01.vm.network "private_network", ip: "192.168.121.101", virtualbox__intnet: "priv"
@vinyar
vinyar / README.md
Created April 8, 2021 18:05 — forked from johnie/README.md
Filter Phish – This Google Apps Scripts filter will automatically move all future emails with the header `X-PHISHTEST` to trash.

Filter Phish

This Google Apps Scripts filter will automatically move all future emails with the header X-PHISHTEST to trash.

Getting started

  1. Go to Google Apps Script
  2. Add a new script and copy paste the content from the sibling file
  3. Test run the script, go to View in the menu bar and click Logs
  • If there's no errors it should be blank, OR a verbose message that it removed a phishing email.
@vinyar
vinyar / global-protect.sh
Created March 30, 2021 16:58 — forked from kaleksandrov/global-protect.sh
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@vinyar
vinyar / Brewfile
Created March 18, 2020 03:10 — forked from charlesjohnson/Brewfile
Brewfile
# Taps
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/core"
tap "sambadevi/powerlevel9k"
# Brew CLI apps
brew "fd"
brew "fzf"
@vinyar
vinyar / Remove-OldAzureRmResourceGroups.ps1
Created December 5, 2019 07:37 — forked from rcabr/Remove-OldAzureRmResourceGroups.ps1
Delete Azure resource groups that were created n or more days ago
$days = 7
$pointInTime = [DateTime]::Now.AddDays(-$days);
$horizon = $pointInTime.AddDays(-$days);
"===Removing resource groups created between $horizon and $pointInTime==="
# Get potential log entries
$logs = @()
$logs += Get-AzureRmLog -StartTime $horizon -EndTime $pointInTime -Status "Succeeded" -ResourceProvider "Microsoft.Resources" -WarningAction "SilentlyContinue" `
| Select-Object ResourceGroupName, ResourceId, @{Name="EventNameValue"; Expression={$_.EventName.Value}}, @{Name="OperationNameValue"; Expression={$_.OperationName.Value}}, EventTimestamp, @{Name="HttpVerb"; Expression={$_.HttpRequest.Method}} `
@vinyar
vinyar / secret.rb
Last active June 8, 2017 02:08 — forked from sethvargo/secret.rb
updated_by_last_action example - Chef extension to extract secrets from HashiCorp's Vault
# Please see the following blog post for more information:
#
# https://www.hashicorp.com/blog/using-hashicorp-vault-with-chef.html
#
resource_name :vault_secret
property :path, String, name_property: true
property :destination, String
@vinyar
vinyar / powershell.ps1
Created June 7, 2017 23:43
echoing out pem to remote windows workstation
-join $(openssl rand -base64 512) > secret_key
cat secret_key
knife winrm -m <IP> -x <USER> -P <PASS> "echo $(gc .\secret_key)>c:\chef\secret_key"
@vinyar
vinyar / Chef-Shell.rb
Last active May 5, 2017 17:29
How to find out where Chef constructs are coming from via Chef-Shell and Test Kitchen through Pry
$ chef-shell [ruby-2.0.0p648]
loading configuration: none (standalone session)
Session type: standalone
Loading...........done.
...
chef (12.19.36)> require 'pry'
=> true
chef (12.19.36)> node
@vinyar
vinyar / example
Last active April 30, 2017 04:30
example
app_cookbook
attribute file
--> default['ms_dsc']['supported_modules'] = %w(mod1 mod5 mod19)
recipe
include_recipe 'ms_dsc'