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
[ | |
{ | |
"id": 101, | |
"description": "GoogleSheets - Convert currency for a particular date", | |
"tags":[ | |
"google", | |
"sheets", | |
"functions", | |
"shortcuts" |
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 | |
# TODO | |
# Generate self-signed cert without root-ca | |
# Generate the private key and self-signed cert for the root CA | |
generate_root_ca() | |
{ | |
ROOT_CA=$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
# Syntax highlighting code in Python using pygments | |
# install pygments if not installed already | |
# pip3 install pygments | |
# sample languages used here: markdown, json | |
from pygments import highlight | |
from pygments.lexers import get_lexer_by_name | |
# Formatting the output to be sent to a terminal | |
# Hence using Terminal256Formatter. Many other formatters |
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
# Sample HTTP requests using vscode rest-client extension | |
# Lines with ### serves as a marker for the extension to insert | |
# links to send requests | |
### A simple GET Request | |
# Get list of sites supported by stackexchange APIs | |
GET https://api.stackexchange.com/2.2/sites | |
### Get list of tags by site | |
GET https://api.stackexchange.com/2.2/tags?site=stackoverflow |
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
import logging | |
import paramiko | |
import sys | |
logging.basicConfig( | |
format='%(name)s,%(levelname)s,%(asctime)s, %(message)s', | |
datefmt='%m/%d/%Y %I:%M:%S %p', | |
encoding='utf-8') | |
class Node: | |
""" |
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
import urllib.request | |
# NOTE: Python 3.6+ installations on macOS require an extra step to work with | |
# https links due to certificate access issues. | |
# Here is a snippet from the release notes. | |
# This package includes its own private copy of OpenSSL 1.1.1. | |
# The trust certificates in system and user keychains managed by the Keychain Access application and the security | |
# command line utility are not used as defaults by the Python ssl module. A sample command script is included |
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
#include <stdio.h> | |
#include <sys/wait.h> // for waitpid | |
#include <sys/mman.h> // for mmap | |
#include <unistd.h> // for fork | |
/* | |
* An example of communicating between parent and child processes through | |
* shared memory using mmap | |
*/ |