#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
terraform { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
} | |
} | |
} | |
provider "digitalocean" { | |
} |
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.
# Example networking sidecar ingress containers for Cloudflare Argo, Wireguard, Tailscale, LetSencrypt, Caddy, and SOCKS/SSH tunnel containers in Docker Compose. | |
# https://gist.github.com/pirate/1996d3ed6c5872b1b7afded250772f7c | |
# Goes well with these docker-compose database container examples: | |
# https://gist.github.com/pirate/1fafaa18a47254f388aa5c0f79f7d263 | |
version: '2.4' | |
services: | |
demo: |
## template: jinja | |
#cloud-config | |
{% if v1.distro_release == 'focal' %} | |
users: | |
- name: berkant | |
shell: /usr/bin/bash | |
ssh_import_id: gh:berkant | |
sudo: ALL=(ALL:ALL) NOPASSWD:ALL |
# Viktor Dukhovni's (@vdukhovni) slow rebase, made faster by bisecting, sort of | |
# | |
# fastrebase BRANCH_TO_REBASE ONTO | |
function fastrebase { | |
typeset b N | |
if (($# > 0)) && [[ $1 = -h || $1 = --help ]]; then | |
printf 'Usage: fastrebase BRANCH_TO_REBASE ONTO_HEAD\n' | |
printf ' fastrebase # to continue after resolving conflicts\n' | |
printf '\n\tfastrebase is a shell function that uses the following\n' |
import os | |
from datetime import datetime, timedelta | |
from typing import Any, Dict, Generator, List, Union | |
import requests | |
# Optional - to connect using OAuth credentials | |
from oauthlib.oauth1 import SIGNATURE_RSA | |
class JiraClient: | |
def __init__( |
This is a sample script for modifying the revisions of a file on Google Drive using Google Apps Script. This script can be used for not only Google Docs files, but also the files except for Google Docs.
Unfortunately, in the current stage, at Google Docs files, the revision of Google Docs cannot be directly changed by APIs with a script. So as one of several workarounds, I would like to propose to overwrite the Google Docs file using the exported data. On the other hand, at the files except for Google Docs, the data can be directly retrieved with the revision ID. This can be used for overwriting the file. The flow of this script is as follows.