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
SUCCESS 0 // Success | |
PENDING -1 // Pending | |
TIMEOUT -2 // Timeout | |
PARTIAL_RESULTS -3 // Partial results | |
ERROR -4 // Error | |
BADARG -5 // Bad Arguments | |
BADOPTION -6 // Mode not supported | |
UNSUPPORTED -7 // Unsupported function | |
OUT_OF_HEAP_SPACE -8 // Dynamic memory space exhausted | |
NOTUP -9 // Interface is not currently 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
#!/usr/bin/env bash | |
# Usage: | |
# $ glc refactor | |
set -e | |
# use any characters besides: [],; | |
_types="[🎨],[style],[improve structure / format of the code] | |
[⚡️],[perf],[improve performance] |
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 python3 | |
from argparse import ArgumentParser | |
import os | |
from subprocess import check_output | |
import sys | |
import yaml | |
FZF_HEIGHT = 8 |
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 debug from 'debug'; | |
import { | |
bind, | |
filter, | |
identity, | |
join, | |
memoizeWith, | |
nthArg, | |
pipe, | |
slice, |
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 'dart:async'; | |
import 'package:stream_transform/src/from_handlers.dart'; | |
extension OfType<T> on Stream<T> { | |
Stream<T> ofType<ActionType>() { | |
return transform(fromHandlers( | |
handleData: (element, sink) { | |
if (element is ActionType) { | |
sink.add(element); |
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
{ | |
"tls": true, | |
"tlsverify": true, | |
"tlscacert": "/path/to/certs/ca.pem", | |
"tlscert": "/path/to/certs/server-cert.pem", | |
"tlskey": "/path/to/certs/server-key.pem", | |
"hosts": [ | |
"unix:///var/run/docker.sock", | |
"tcp://0.0.0.0:2376" | |
] |
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
resource "null_resource" "volume" { | |
connection { | |
type = "ssh" | |
host = "ip" | |
user = "user" | |
private_key = file("~/.ssh/id_rsa") | |
} | |
triggers = { | |
dir = var.dir_path |
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
function fish_prompt --description 'Write out the prompt' | |
set -l last_status $status | |
set_color $fish_color_cwd | |
echo -n (prompt_pwd) | |
set_color normal | |
__terlar_git_prompt | |
fish_hg_prompt | |
echo |
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
help: ## Show this help message | |
@egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#' | |
do-something: ## This command will do something | |
echo "something" | |
.PHONY: help |
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 | |
# | |
# Usage: group.sh target_directory | |
# Result: | |
# target_directory/2020/...files from 2020 | |
# target_directory/2021/...files from 2021 | |
# | |
set -e |
OlderNewer