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
# Make sure the repo is cloned with --bare | |
# Guide: https://nicknisi.com/posts/git-worktrees/ | |
# Paste the following in your .zshrc | |
alias newtree='new-worktree' | |
new-worktree() { | |
local branch_name="$1" | |
local repo_dir="PATH TO YOUR REPO" | |
local worktree_dir="$repo_dir/$branch_name" |
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
#!/bin/bash | |
# Setup | |
# touch ~/.git/hooks/pre-commit | |
# chmod +x ~/.git/hooks/pre-commit | |
# git config --global core.hooksPath ~/.git/hooks | |
# Get the current user email | |
user_email=$(git config --global user.email) | |
user_email=$(git config --global user.email) |
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
[ | |
{ | |
"context": "Editor", | |
"bindings": { | |
"alt-up": "editor::MoveLineUp", | |
"alt-down": "editor::MoveLineDown", | |
"alt-shift-down": "editor::DuplicateLine", | |
"alt-shift-up": ["workspace::SendKeystrokes", "alt-shift-down up"], | |
"cmd-shift-k": "editor::DeleteLine" | |
} |
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
mkdir ~/global-git-hooks | |
code ~/global-git-hooks/pre-commit | |
chmod +x ~/global-git-hooks/pre-commit | |
git config --global core.hooksPath ~/global-git-hooks |
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
/* | |
//INPUT | |
API_KEY | |
SHEET_ID | |
SHEET_NAME(optional) | |
// Returns | |
headers | |
items(formatter as { header: value } |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+l"], "command": "find_all_under" }, | |
{ "keys": ["ctrl+f2"], "command": "find_all_under" }, | |
{ "keys": ["alt+shift+i"], "command": "split_selection_into_lines" }, | |
{ "keys": ["ctrl+b"], "command": "toggle_side_bar" }, | |
{ "keys": ["ctrl+shift+b"], "command": "build" }, | |
{ "keys": ["alt+up"], "command": "swap_line_up" }, | |
{ "keys": ["alt+down"], "command": "swap_line_down" }, | |
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} }, | |
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} }, |
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
#!make | |
include .env | |
export $(shell sed 's/=.*//' .env) | |
build: | |
@echo "hi ${SOURCE_DATABASE_NAME}" | |
export: | |
@(docker exec -i ${SOURCE_CONTAINER_ID} mysqldump -u ${SOURCE_DATABASE_USERNAME} -p${SOURCE_DATABASE_PASSWORD} ${SOURCE_DATABASE_NAME}) > ../directusdb/dump.sql |
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
<template> | |
<div> | |
<label>{{ label }}</label> | |
<input | |
v-on="listeners" | |
v-bind="$attrs" | |
/> | |
</div> | |
</template> |
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
{"LION":{"latency":183.540149,"download":18.95268006495637,"upload":13.125318661571571,"timestamp":"2023-08-11T12:09:08.312074035+04:00"},"MARS":{"latency":0,"download":0,"upload":0,"timestamp":"2023-08-11T12:09:08.495608854+04:00"},"METISS":{"latency":0,"download":0,"upload":0,"timestamp":"2023-08-11T12:09:08.541537373+04:00"},"SAFE1":{"latency":0,"download":0,"upload":0,"timestamp":"2023-08-11T12:09:08.358202271+04:00"},"SAFE2":{"latency":0,"download":0,"upload":0,"timestamp":"2023-08-11T12:09:08.404005203+04:00"},"SAFE3":{"latency":0,"download":0,"upload":0,"timestamp":"2023-08-11T12:09:08.449744506+04:00"}} |
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
// Open the developer toosl console and execute the folowing command to get an array of countries listed on the page. | |
// Right click and copy object for convenience. | |
// For use on this page: https://www.cdc.gov/coronavirus/2019-ncov/locations-confirmed-cases.html | |
let nodes = document.querySelectorAll(".syndicate li"); | |
let list = [].slice.call(nodes); | |
let innertext = list.map(function(e) { return e.innerText; }); | |
console.log(innertext); |
NewerOlder