kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# authenticate | |
from google.colab import auth | |
auth.authenticate_user() | |
import gspread | |
from oauth2client.client import GoogleCredentials as GC | |
gc = gspread.authorize(GC.get_application_default()) | |
# create, and save df | |
from gspread_dataframe import set_with_dataframe | |
title = 'New Sheet' | |
gc.create(title) # if not exist |
- Set an environment variable called
CMDER_ROOT
to your root Cmder folder (in my caseC:\Program Files (x86)\Cmder
). It seems to be important that this does not have quotes around it because they mess with concatenation in the init script. - In your IntelliJ terminal settings, use
"cmd" /k ""%CMDER_ROOT%\vendor\init.bat""
as the Shell path. The double-double-quotes are intentional, as they counteract the missing double quotes in the environment variable.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.grok.notes.util; | |
import android.app.Activity; | |
import android.os.AsyncTask; | |
import android.util.Log; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
div.scroll | |
{ | |
width:500px; | |
height:400px; | |
overflow:scroll; | |
} | |
</style> | |
<div class="scroll"> | |
some text is present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# checks if branch has something pending | |
function parse_git_dirty() { | |
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*" | |
} | |
# gets the current git branch | |
function parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" |