-
git-trim trims your branches whose tracking remote refs are merged or stray. See also
-
pod-graceful-drain Kubernetes controller that reduce downtime when you rollout a deployment with load balancers.
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 boto3 | |
from datetime import datetime, timezone | |
import logging | |
import urllib.request | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
s3 = boto3.resource('s3') | |
BUCKET_NAME = "weather-go-kr-radar-predict-crawler-images" |
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
// ==UserScript== | |
// @name Contents Clamp | |
// @updateURL https://gist.github.com/foriequal0/12794f45f5ef60249e8ba36f978dfaa4/raw/content-clamp.user.js | |
// @version 10 | |
// @match http://*/* | |
// @match https://*/* | |
// @run-at document-idle | |
// ==/UserScript== | |
(function ContentsClamp(){ |
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 | |
# git-sync: pull, prune, trim all branches. | |
# requires: (optional) git-trim | |
set -euo pipefail | |
CURRENT=$(git branch --show-current) | |
do-ff() { |
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 | |
## git-fixup: fixup and rebase interactively. | |
## requires fzf | |
set -euo pipefail | |
get-base() { | |
local REMOTE_HEAD; | |
local REMOTE_BASE; |
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 zsh | |
git() { | |
if [[ $1 == "checkout" ]]; then | |
echo "Use 'git swtich' or 'git restore'" | |
return -1 | |
fi | |
if [[ $1 == "switch" ]] && [[ "$#" -eq 1 ]]; then | |
local BRANCHES=$(git branch --list --verbose | grep -v -e "^\*" | sed 's/^\s*//') | |
local BRANCH=$(echo "$BRANCHES" | fzf --height 8 --select-1 --exit-0 | awk '{print $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
#!/usr/bin/env bash | |
## Requires: (optional) git-sync | |
set -euo pipefail | |
OPTS_SPEC="\ | |
$0 [<branch-name>] [<options>] | |
An opinionated git workflow for random walker. |
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
use std::collections::VecDeque; | |
use std::error::Error; | |
use std::fmt::{Display, Formatter}; | |
use std::io::{stdin, Read}; | |
type Result<T> = std::result::Result<T, Box<dyn Error>>; | |
fn main() -> Result<()> { | |
let mut input = String::new(); | |
stdin().read_to_string(&mut input)?; |
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
use std::collections::{HashSet, VecDeque}; | |
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] | |
enum Dir { | |
Left, | |
Right, | |
Down, | |
Up, | |
} |
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 { CfnElement, CfnResource, Stack } from "@aws-cdk/core"; | |
import { makeUniqueId } from "@aws-cdk/core/lib/private/uniqueid"; | |
import { Node } from "constructs"; | |
import * as assert from "assert"; | |
const PINNED_RESOURCE_NAMES_CONTEXT_KEY = "pinnedLogicalIds"; | |
type PinnedLogicalIds = { [segment: string]: PinnedLogicalIds | string }; | |
export class StableNameStack extends Stack { |