Skip to content

Instantly share code, notes, and snippets.

View kameshsampath's full-sized avatar

Kamesh Sampath kameshsampath

View GitHub Profile
kind: ConfigMap
apiVersion: v1
metadata:
name: knative-serving-operator
data:
customResourceDefinitions: |-
- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:

Run Strimzi on Minishift

As a cluster-admin user, with a correctly running Minishift, perform the following steps:

#!/usr/bin/env bash

# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
#Refernece: https://wiki.archlinux.org/index.php/Color_Bash_Prompt
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
Yellow='\[\e[0;33m\]' # Yellow
@seanhinkley
seanhinkley / BootApplication.java
Created February 17, 2016 16:49
spring boot + thymeleaf 3
package com.boot;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.SpringApplication;
//make sure spring boot doesn't attempt 2.1 config
@SpringBootApplication(exclude={org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.class} )
public class AppApplication {
public static void main(String[] args) {
SpringApplication.run(AppSecurityApplication.class, args);
}
}
@kameshsampath
kameshsampath / stream_profile.json
Last active August 24, 2021 14:34
VSCode profile for streaming
{
"files.exclude": {
"**/.classpath": true,
"**/.factorypath": true,
"**/.idea": true,
"**/.iml": true,
"**/.mvn": true,
"**/.project": true,
"**/.settings": true,
"**/.vagrant": true,
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@kameshsampath
kameshsampath / grpc_envoy.yaml
Created November 16, 2022 05:15
Envoy YAML to expose gRPC service over http
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 10000 }
@davoclavo
davoclavo / dataURItoBlob.js
Last active May 26, 2023 14:45
Convert dataURI to Blob so large images do not crash the browser. Based on: http://stackoverflow.com/questions/10412299 and http://stackoverflow.com/questions/6850276
/*
The MIT License (MIT)
Copyright (c) 2016 David Gomez-Urquiza
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, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
@nobitagit
nobitagit / iterm2.md
Last active August 24, 2023 12:16
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager