This file contains hidden or 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 grub-reboot 2 && sudo reboot | |
sudo grub-set-default <num> | |
27 systemd-analyze | |
28 systemd-analyze blame | |
# Enable RDB from system properties | |
# Enable Lan from Turn off on windows features |
This file contains hidden or 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
""" Demonstrating APScheduler feature for small Flask App. """ | |
from apscheduler.schedulers.background import BackgroundScheduler | |
from flask import Flask | |
from datetime import datetime | |
from pytz import timezone | |
tz = timezone('US/Eastern') | |
print(datetime.now(tz) ) | |
# https://gist.github.com/ivanleoncz/21293b00d0ea54db8ee3b57fb1170ddf |
This file contains hidden or 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
# 341 vi ~/.profile | |
# 342 ssh-copy-id [email protected] | |
# 344 source ~/.profile | |
# 343 pls | |
# Usage | |
# Backup current folder ( will exclude . files ) | |
# pbkp | |
# List remote | |
# $ pls |
This file contains hidden or 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
# install terraform steps and interactive web browser | |
# https://learn.hashicorp.com/tutorials/terraform/install-cli | |
provider "google" { | |
#version = "3.5.0" | |
# credentials = file("/downloads/compute-instance.json") | |
# OR | |
# use gcloud auth application-default login/revoke | |
project = "zeta-yen-319702" | |
region = "us-central1" |
This file contains hidden or 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
# Reference | |
# https://stackoverflow.com/questions/7300321/how-to-use-pythons-pip-to-download-and-keep-the-zipped-files-for-a-package | |
mkdir /temp/pypack | |
pip freeze > requirements.txt | |
pip download -d /tmp -r requirements.txt | |
# zip and move te requirements file also so that it can e used on target |
This file contains hidden or 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
https://dev.botframework.com/bots | |
https://docs.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-create-bot?view=azure-bot-service-4.0&tabs=csharp%2Cvs | |
https://www.youtube.com/watch?v=-FHc_lZ6jJY | |
https://youtu.be/RjGVOFm39j0?t=651 |
This file contains hidden or 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
{ | |
"terminal.integrated.profiles.windows": { | |
"PowerShell": { "source": "PowerShell", "icon": "terminal-powershell" }, | |
"GitBash": { | |
"path": "${env:windir}\\System32\\cmd.exe", | |
"args": ["/k","C:\\Tools\\cmder\\vendor\\git-for-windows\\bin\\bash.exe"] | |
}, | |
"Cmder": { | |
"path": "${env:windir}\\System32\\cmd.exe", | |
"args": ["/k", "C:\\Tools\\cmder\\vendor\\bin\\vscode_init.cmd"] |
This file contains hidden or 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 python3 | |
#$ python3 ip-to-hostname.py 216.58.196.4 | |
#Address: 216.58.196.4 | |
#Host: ('kul08s09-in-f4.1e100.net', [], ['216.58.196.4']) | |
import socket | |
import sys | |
address = sys.argv[1] | |
host = socket.gethostbyaddr(address) |
This file contains hidden or 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 python | |
# python subnet.py 200.100.33.65/26 | |
# from: curl -O https://gist.github.com/ibrezm1/4b4274006dc2a5d5ad48e6b2c395633b/subnet.py | |
import sys | |
# Get address string and CIDR string from command line | |
(addrString, cidrString) = sys.argv[1].split('/') | |
# Split address into octets and turn CIDR into int |
This file contains hidden or 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 | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_USER=$(gcloud config get-value core/account) # set current user | |
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)") | |
export IDNS=${PROJECT_ID}.svc.id.goog # workload identity domain | |
export GCP_REGION="us-central1" | |
export GCP_ZONE="us-central1-a" |