Skip to content

Instantly share code, notes, and snippets.

View ssi-anik's full-sized avatar
💻
Open to remote work!

Syed Sirajul Islam Anik ssi-anik

💻
Open to remote work!
View GitHub Profile
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>
);
}
@hershkoy
hershkoy / gdrive_get_large_file.sh
Created December 9, 2020 08:27
Download large file from Google Drive (2020)
#!/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
@Maxzor
Maxzor / remove-all-from-docker-oneliner.sh
Last active January 10, 2025 19:02 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
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;
@antfu
antfu / 📊 Weekly development breakdown
Last active November 20, 2023 10:25
📊 Weekly development breakdown
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%
@joaorbrandao
joaorbrandao / SelfReferenceTrait.php
Last active September 13, 2024 19:02
Laravel Model Self Reference
<?php
namespace App\Traits;
trait SelfReferenceTrait
{
protected $parentColumn = 'parent_id';
public function parent()
{
@2KAbhishek
2KAbhishek / Shell_Keybindings.md
Last active January 15, 2025 12:29
Keyboard shortcuts for bash/zsh

Shell Keybindings

Navigation 🚀

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
@mohamedhafezqo
mohamedhafezqo / example.php
Last active March 3, 2024 22:22
GraphQL Client For PHP Using Guzzle
<?php
$endPoint = 'https://api.github.com/graphql';
$query = <<<'GRAPHQL'
query getUsers {
user {
id
name
}
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active January 22, 2025 19:40
set -e, -u, -o, -x pipefail explanation
@jesugmz
jesugmz / generate-docker-base64-auth-token.md
Created August 20, 2018 00:00
Generate Docker base64 auth token

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
@sonhmai
sonhmai / kafka
Last active October 7, 2024 14:12
kafka basic commands
# 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