Skip to content

Instantly share code, notes, and snippets.

View kennonkwok's full-sized avatar

Kennon Kwok kennonkwok

View GitHub Profile
@kennonkwok
kennonkwok / .gitconfig
Last active October 3, 2015 01:27
my gitconfig
[user]
name = Kennon Kwok
email = kennon@bitcasa.com
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
@kennonkwok
kennonkwok / .kitchen.yml
Created November 7, 2014 19:25
kitchen ec2 example
---
driver:
name: ec2
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: xyz-training
platforms:
- name: centos
driver:
@kennonkwok
kennonkwok / Vagrantfile
Created January 26, 2015 23:55
Vagrantfile for CS12 cluster
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "opscode-centos-6.6"
@kennonkwok
kennonkwok / Vagrantfile
Last active August 29, 2015 14:14
Vagrantfile for training
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "opscode-rhel-6.5"
config.vm.box_url = "http://sl73cirepoapp01.visa.com/pub/vblock/gsesa/bento/opscode_rhel-6.5_chef-provisionerless.box"
@kennonkwok
kennonkwok / messages.json
Created November 4, 2015 23:40
sumo.d example
{
"api.version": "v1",
"source":
{
"name": "Messagessss",
"sourceType": "LocalFile",
"automaticDateParsing": true,
"multilineProcessingEnabled": false,
"useAutolineMatching": true,
"forceTimeZone": false,
@kennonkwok
kennonkwok / sumologic_source.rb
Created November 5, 2015 15:37
sumologic_source.rb
require 'json'
resource_name :sumologic_source
# properties/defaults from: https://service.sumologic.com/help/Using_JSON_to_configure_Sources.htm
property :name, String, name_property: true
property :description, String, default: nil
property :category, String, default: nil
property :hostName, String, default: nil
property :timeZone, String, default: nil
# sourceType can be
@kennonkwok
kennonkwok / install_compliance.md
Last active February 8, 2016 18:50
install_compliance.md

Installing compliance server via packagecloud

Manual setup for apt

setup gpg keys and https downloads:

curl https://packagecloud.io/gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install debian-archive-keyring #debian only
sudo apt-get install -y apt-transport-https
tap 'caskroom/cask'
tap 'caskroom/fonts'
tap 'caskroom/versions'
tap 'homebrew/binary'
tap 'homebrew/bundle'
tap 'homebrew/core'
cask 'java'
brew 'openssl'
brew 'readline'
@kennonkwok
kennonkwok / gist:cec68a576dc006a75bf4c1da416f1473
Last active September 17, 2019 20:26
k8s/jmeter demo script
# Verify cluster/settings
kubectl cluster-info
kubectl get-contexts
# inspect job.yaml
# * parallelism
# * requests/limits
# * timeout
# apply job.yaml and service.yaml