Skip to content

Instantly share code, notes, and snippets.

@nicolaihald
nicolaihald / kubectl-multi-version-brews.md
Created December 7, 2020 05:50 — forked from rdump/kubectl-multi-version-brews.md
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

We need to run multiple versions of kubectl for compatibility with various kubernetes clusters.

It's a bit easier to get and use multiple versions of kubectl using Homebrew than it is using Macports.

With brew, it's simple to:

  • Install a bunch of versions of kubectl (in the kubernetes-cli Formula)
  • Switch between them as needed
@nicolaihald
nicolaihald / v1-ubuntu-docker-node-apt-get.sh
Created April 11, 2017 10:46 — forked from garystafford/v1-ubuntu-docker-node-apt-get.sh
Install the latest versions of Node.js and npm into a Docker Ubuntu container, with or without need for root access. Easily update both applications to the latest versions. Creates a new user account ('testuser') and installs common npm packages.
###############################################################################
# Version 1: using ‘apt-get install’
# Installs using apt-get
# Requires update to npm afterwards
# Harder to get latest copy of node
# Requires sudo to use npm
###############################################################################
# create new docker ubuntu container
sudo docker run -i -t ubuntu /bin/bash # drops you into container as root
@nicolaihald
nicolaihald / DisableNuGetPackageRestore.ps1
Created October 28, 2015 13:36 — forked from mkchandler/DisableNuGetPackageRestore.ps1
Disable the NuGet Package Restore functionality in a Visual Studio solution.
# Usage: .\DisableNuGetPackageRestore.ps1 C:\Path\To\Solution.sln
# Get the path that the user specified when calling the script
$solution = $args[0]
$solutionPath = Split-Path $solution -Parent
$solutionName = Split-Path $solution -Leaf
# Delete the .nuget directory and all contents
Remove-Item (Join-Path $solutionPath ".nuget") -Force -Recurse -ErrorAction 0
#!/bin/sh
#
# /etc/init.d/kibana4 -- startup script for kibana4
# [email protected] 2015-02-20; used elasticsearch init script as template
# https://github.com/akabdog/scripts/edit/master/kibana4_init
#
### BEGIN INIT INFO
# Provides: kibana4
# Required-Start: $network $remote_fs $named
# Required-Stop: $network $remote_fs $named
Synchronous time for 8 connections: 00:00:01.0194025
Synchronous time for 9 connections: 00:00:02.0362007
Asynchronous time for 8 connections: 00:00:01.0413737
Asynchronous time for 9 connections: 00:00:01.0238674
package computerdatabase
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.http.HeaderNames._
import scala.concurrent.forkjoin.ThreadLocalRandom
import scala.concurrent.duration._
class ComputerDababase extends Simulation {
object Search {
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask
TaskName="GetVersion"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
<ParameterGroup>
<VersionString ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Output="true" />
// override default jQuery transport for IE
if(window['XDomainRequest']) {
// save default xhr
jQuery.ajaxSettings.xhr_back = jQuery.ajaxSettings.xhr;
jQuery.ajaxSettings.xhr = function() {
if(this.crossDomain) {
try {
// IE sucs
var xhr = new window.XDomainRequest();
xhr.onload = function() {