This file contains hidden or 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
# Usage bash weekly-git-report.sh [days=7] | |
DAYS=${1:-7} | |
FOLDERS=$(find . -maxdepth 2 -name ".git" -type d | sort) | |
# echo $FOLDERS | |
ROOT=$(pwd) | |
echo "$FOLDERS" | while read -r folder; do | |
folder=$(dirname "$folder") | |
echo "==$folder==" | |
echo "$ROOT/$folder" |
This file contains hidden or 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
async function waitForDownloadStreamToFinish( | |
readable: StreamingBlobPayloadOutputTypes, | |
writeStream: fs.WriteStream, | |
) { | |
return new Promise(async (resolve, reject) => { | |
(readable as http.IncomingMessage) | |
.pipe(writeStream) | |
.on("error", (err: Error) => reject(err)) | |
.on("close", () => resolve(null)); | |
}); |
This file contains hidden or 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 const colors = { | |
slate: { | |
50: "#f8fafc", | |
100: "#f1f5f9", | |
200: "#e2e8f0", | |
300: "#cbd5e1", | |
400: "#94a3b8", | |
500: "#64748b", | |
600: "#475569", | |
700: "#334155", |
This file contains hidden or 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\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\Storage; | |
class TailLog extends Command | |
{ | |
/** |
This file contains hidden or 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
// you can run this tutorial - it's executable | |
// fake function for demonstration | |
async function fetchSomething(item) { | |
return item; | |
} | |
async function learnLoops() { | |
// let's have some simple array first | |
// note that each value has also an 0-base index |
This file contains hidden or 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
# List samba shares | |
smbclient -L 192.168.1.189 -U depidsvy | |
# mount NFS | |
sudo mount 192.168.1.189:/volume1/photo /media/nas/photo | |
# mount samba share to a folder | |
sudo mount -t cifs -o username=depidsvy,password=$pw,uid=slawa,gid=users //192.168.1.189/photo /media/nas/photo2 | |
# mount SFTP |
This file contains hidden or 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:convert'; | |
import "dart:io"; | |
import 'package:html/dom.dart'; | |
import 'package:html/parser.dart' as parser; | |
import "package:http/http.dart" as http; | |
import 'package:http/http.dart'; | |
import "package:yaml/yaml.dart"; | |
main() async { |
This file contains hidden or 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
let g:netrw_banner = 0 | |
let g:netrw_liststyle = 3 | |
let g:netrw_browse_split = 4 | |
let g:netrw_altv = 1 | |
let g:netrw_winsize = 25 |
This file contains hidden or 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 returns random string key like: cg8rP, QUdfX, 4veH7 | |
CREATE OR REPLACE FUNCTION you_id() | |
RETURNS varchar AS $$ | |
DECLARE | |
num FLOAT; | |
key TEXT; | |
bin BYTEA; | |
BEGIN |
NewerOlder