Skip to content

Instantly share code, notes, and snippets.

View carolynvs's full-sized avatar

Carolyn Van Slyck carolynvs

View GitHub Profile
@carolynvs
carolynvs / Dual Mode Service Catalog CLI.md
Last active January 9, 2018 15:20
Dual Mode Service Catalog CLI

Dual Mode Service Catalog CLI

We can use the same binary as a standalone Service Catalog CLI, and as a kubectl plugin, with only minor modifications.

Standalone Binary

This is what you see today with svcat.

Installation

curl -sLO https://servicecatalogcli.blob.core.windows.net/cli/latest/$(uname -s)/$(uname -m)/svcat
@carolynvs
carolynvs / README.md
Last active April 28, 2017 20:26
Debian (Jesse) Docker Config
  1. Install Docker
    sudo apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     software-properties-common
    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
    sudo add-apt-repository \
     "deb [arch=amd64] https://download.docker.com/linux/debian \
    
@carolynvs
carolynvs / readme.md
Last active January 13, 2019 17:45
Setup ALL THE THINGS!
  • brew install git
  • brew tap johanhaleby/kubetail && brew install kubetail or brew install --HEAD kubetail
  • brew install findutils gives me gfind, which supports all the args
  • brew install bash-completion gives me autocomplete for stuff like kubectl and minikube
  • Upgrade Bash so that I have access to more commands, flags and to get bash completion working for kubectl
    brew install bash
    sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
    chsh -s /usr/local/bin/bash
    
@carolynvs
carolynvs / .bashrc
Last active March 1, 2017 02:14
Quickly cd into a golang repo
# 0. Add this function to ~/.bashrc.
# On a mac, install coreutils first and add this function to your ~/.bash_profile.
# 1. Make a shorter symlink pointing to the long golang directory name
# ln -s ~/go/src/github.com/foo/bar ~/foobar
# 2. goto foobar
goto() {
cd `realpath ~/$1`
}
  1. On Rackspace Public Cloud, create an 8GB General Server with Ubuntu 14.04 PVHM.
  2. SSH in as root. If you are really cool, use tmux at this time.
  3. Install OpenStack Liberty
    bash <(curl -s https://raw.githubusercontent.com/openstack/openstack-ansible/liberty/scripts/run-aio-build.sh)
    
  4. Once complete, you can find the admin password in /root/openrc. Save it for later to log into Horizon.
  5. Fix the neutron endpoint to work with the SDK:
  6. lxc-ls | grep utility.
  7. lxc-attach -n aio1_utility_container-XXX. Replace XXX with the name you found in the last step.
@carolynvs
carolynvs / project.json
Last active August 29, 2015 14:26
nuget wildcard
{
"dependencies":
{
"Newtonsoft.Json": "6.*",
"Microsoft.AspNet.Mvc": "6.0.0-*"
},
"frameworks":
{
"net45": {}
}
@carolynvs
carolynvs / project.json
Last active August 29, 2015 14:06
Sample project.json
{
"dependencies": {
"AutoMapper": "2.2.1",
"MyProject": ""
},
"frameworks": {
"net45": {}
},
"commands": {
"custom-command": "My.Custom.Package --arg1 some-value"
@carolynvs
carolynvs / install-mono.sh
Last active April 19, 2020 11:14
Install Mono on Ubuntu
wget http://download.mono-project.com/repo/xamarin.gpg
sudo apt-key add xamarin.gpg
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee --append /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
sudo certmgr -ssl -m https://go.microsoft.com
sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
sudo certmgr -ssl -m https://nuget.org
mozroots --import --sync

Keybase proof

I hereby claim:

  • I am carolynvs on github.
  • I am carolynvs (https://keybase.io/carolynvs) on keybase.
  • I have a public key whose fingerprint is D31E 7624 60E3 13EA 9780 1E16 33EE CC2F FF11 A333

To claim this, I am signing this object:

@carolynvs
carolynvs / RequireHttpAttribute.cs
Last active December 11, 2015 06:18
RequireHttp attribute allows redirecting back to HTTP after visiting a secured page. Enables mixing secured and unsecured pages in ASP.NET MVC.
/// <summary>
/// Forces a secured (HTTPS) request to be resent over HTTP
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class RequireHttpAttribute : FilterAttribute, IAuthorizationFilter
{
public virtual void OnAuthorization(AuthorizationContext filterContext)
{
if(filterContext == null)
{