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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: sftp | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: |
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
#sudo wget http://nginx.org/download/nginx-1.9.12.tar.gz | |
#sudo tar -xvzf nginx-1.9.12.tar.gz | |
#cd nginx-1.9.12 | |
#sudo apt-get install -y build-essential libpcre3 libpcre3-dev zlib1g-dev | |
#sudo ./configure --with-stream && sudo make && sudo make install | |
# /usr/local/nginx/conf/nginx.conf - NGINX configuration file | |
worker_processes 1; |
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
#!/bin/bash | |
echo "SELECT * FROM people" | sqlite3 person.sqlite | |
echo "INSERT INTO people (firstName,lastName) | |
VALUES | |
('john', 'marsden-"{$RANDOM_ID}"') | |
" | sqlite3 person.sqlite | |
echo "SELECT * FROM people" | sqlite3 person.sqlite |
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
MY_NAME=nitish |
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
#!/bin/bash | |
# Thanks to https://medium.com/@craignewtondev/how-to-fix-kubernetes-namespace-deleting-stuck-in-terminating-state-5ed75792647e | |
# NB this can be dangerous, so use sparingly | |
export ns=broken-app; kubectl get ns "${ns}" -o json | sed s/\"kubernetes\"//g | kubectl replace --raw /api/v1/namespaces/"${ns}"/finalize -f - |
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
#!/bin/bash | |
# inspired by Leafshade software https://www.youtube.com/watch?v=zB_3FIGRWRU&t=333s | |
# daily notes | |
#noteFilename="$HOME/Dropbox/notes/notes/note-$(date +%Y-%m-%d).md" | |
# weekly notes | |
fileDate="$(date +%Y-%m-%d)" | |
if [[ "$(date +%a)" != "Mon" ]]; then | |
fileDate="$(date -dlast-monday +%Y-%m-%d)" | |
fi |
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
/** | |
* Plain Rest Web api, no external deps | |
* Nodejs > 14 | |
*/ | |
const http = require("http"); | |
const { | |
port = 8080, | |
yourName = "Themba", | |
environment = "development", | |
} = process.env; |
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
'original version by Tarsem Singh of STTM | |
Attribute VB_Name = "Module1" | |
Private Function convertedChar(AscID) As String | |
'Debug.Print Chr(AscID) & "=" & AscID | |
Select Case AscID | |
Case 32: convertedChar = " " | |
Case 48: convertedChar = "0" | |
Case 49: convertedChar = "1" | |
Case 50: convertedChar = "2" |
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
# log what I'm working on to a text file unde `$repo/<year>/<month>/<day>.md` | |
# change the $repo variable to point to a dir on your machine | |
# if the dir is a git repo then it will also commit to git, otherwise just do nothing | |
# | |
# USAGE: on "working on creating a script to make things better" | |
function on(){ | |
local version="1.1.4" | |
local repo="/home/jujhar/proj/jujhar-daily-log" | |
local year=$(date +%Y) | |
local month=$(date +%m) |
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
rem Watch.bat - trying to emulate linux watch command on windows | |
rem inspired by http://stackoverflow.com/questions/6765554/is-there-a-windows-command-line-equivalent-to-linux-watch-command amd http://superuser.com/questions/191063/what-is-the-windows-analog-of-the-linux-watch-command | |
@echo off | |
title Watch %1 %2 %3 %4 %5 | |
:loop | |
cls | |
%1 %2 %3 %4 %5 | |
echo. | |
timeout /t 2 | |
goto loop |
NewerOlder