Keybinding | Action |
---|---|
Alt + f/b | Move cursor to previous/next word |
Ctrl + a/e | Move cursor to beginning/end of command |
Ctrl + xx | Toggle between the start of line and current cursor position |
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
export default function ProgressBar() { | |
return ( | |
<div className='w-full'> | |
<div className='h-1.5 w-full bg-pink-100 overflow-hidden'> | |
<div className='animate-progress w-full h-full bg-pink-500 origin-left-right'></div> | |
</div> | |
</div> | |
); | |
} |
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
#!/bin/bash | |
if [ $# != 2 ]; then | |
echo "Usage: googledown.sh ID save_name" | |
exit 0 | |
fi | |
confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p') | |
echo $confirm | |
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$confirm&id=$1" -O $2 && rm -rf /tmp/cookies.txt |
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
echo "Removing containers :" && if [ -n "$(docker container ls -aq)" ]; then docker container stop $(docker container ls -aq); docker container rm $(docker container ls -aq); fi; echo "Removing images :" && if [ -n "$(docker images -aq)" ]; then docker rmi -f $(docker images -aq); fi; echo "Removing volumes :" && if [ -n "$(docker volume ls -q)" ]; then docker volume rm $(docker volume ls -q); fi; echo "Removing networks :" && if [ -n "$(docker network ls | awk '{print $1" "$2}' | grep -v 'ID\|bridge\|host\|none' | awk '{print $1}')" ]; then docker network rm $(docker network ls | awk '{print $1" "$2}' | grep -v 'ID\|bridge\|host\|none' | awk '{print $1}'); fi; | |
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
TypeScript 21 hrs 47 mins ████████████████▒░░░ 67.1% | |
Vue.js 6 hrs 21 mins ██████▓░░░░░░░░░░░░░ 19.6% | |
JSON 2 hrs 10 mins ████▒░░░░░░░░░░░░░░░ 6.7% | |
JavaScript 46 mins ███▒░░░░░░░░░░░░░░░░ 2.4% |
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
<?php | |
namespace App\Traits; | |
trait SelfReferenceTrait | |
{ | |
protected $parentColumn = 'parent_id'; | |
public function parent() | |
{ |
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
<?php | |
$endPoint = 'https://api.github.com/graphql'; | |
$query = <<<'GRAPHQL' | |
query getUsers { | |
user { | |
id | |
name | |
} |
docker login
will produce a base64 digest if the binaries pass
and secretservice
are not present on Linux platforms (source).
To generate a base64 auth token:
echo -n 'username:password' | base64
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
# BENCHMARK----------------------------------------------------- | |
#1. Rust kafka-benchmark (https://github.com/fede1024/kafka-benchmark) | |
# must create topic with 6 partitions first | |
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 6--topic [scenario] | |
# replace scenario with one in file kafka-benchmark/config/base_producer.yaml |
NewerOlder