Skip to content

Instantly share code, notes, and snippets.

View itbj's full-sized avatar
🌴
On vacation

taoza itbj

🌴
On vacation
View GitHub Profile
@dexterlabora
dexterlabora / Code.gs
Last active April 8, 2024 19:46
Meraki Webooks Demo with Google Sheets
/*
Copy this function over the existing Code.gs file in a Google Sheet
Save the Sheet/Script
Publish App
- Execute as You
- Avaiable to Anyone (including anonymous)
Authorize App when prompted
The URL will act as the Webhook URL for Meraki to send alerts
*/
-- user input - mode
set mode to 2 -- (2 or 3 or 4) if mode is 2, pic1 and pic2 will be used | if mode is 3, pic1,pic2 and pic3 will be used.
-- user input - pics
set pic1 to ""
set pic2 to ""
set pic3 to ""
set pic4 to ""
-- end of user input
if mode is greater than or equal to 2 then
if mode is not greater than 4 then

Install Minikube with virtual-box VM driver

$ brew update && brew install kubectl && brew cask install docker minikube virtualbox
$ brew cask reinstall minikube
$ minikube delete
$ rm -fr ~/.minikube/
@prati0100
prati0100 / robbyrussell.zsh-theme
Created May 27, 2019 12:43
Change color of prompt of robbyrussell zsh theme to yellow if root
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
# PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} '
# Change color of prompt to yellow if root
PROMPT='${ret_status} %{%(#~$fg[yellow]~$fg[cyan])%}%c%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@itbj
itbj / Setup Pivot Table
Created June 14, 2019 12:52 — forked from stevehenderson/Setup Pivot Table
VBA code to initialize a PivotTable
'SetupPivot: The following subroutine sets up a pivot table
'
'
' author: [email protected]
'
'I received assitance from the following site:
'
@itbj
itbj / Dockerfile
Created February 1, 2020 03:47 — forked from MichalZalecki/Dockerfile
Install oh-my-zsh in Docker
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "zsh"]
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
# docker exec -it my-app-container /bin/zsh
@maxtacu
maxtacu / countertimer.py
Last active February 12, 2022 14:28
Python countdown timer https://youtu.be/9QSo3F6sM1w
import time
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-t', '--time', type=int, required=True, help="Time in seconds")
parser.add_argument('-o', '--output',default="counter.txt", help="Output file")
args = parser.parse_args()
def countdown(t):
while t:
@raeq
raeq / strings_00_substring.py
Created July 18, 2020 10:33
Find a needle in a haystack
def sub_00(haystack: str="", needle:str="") -> bool:
return needle in haystack
assert sub_00("the quick brown fox jumped over the lazy dog", "lazy") == True
assert sub_00("the quick brown fox jumped over the lazy dog", "lazys") == False

Install Minikube with virtual-box VM driver

$ brew update && brew install kubectl && brew cask install docker minikube virtualbox
$ brew cask reinstall minikube
$ minikube delete
$ rm -fr ~/.minikube/
@shanselman
shanselman / ohmyposhv3.json
Created December 23, 2020 03:48
My ohMyPoshv3 json
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,