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
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install -r requirements.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
#!/bin/bash | |
input_dir="./input" | |
output_dir="./output" | |
mkdir -p "$output_dir" | |
# Loop through all CR2 files in the input directory | |
for file in "$input_dir"/*.CR2; do | |
echo "Converting $file" |
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
console.clear() | |
const transformMap: { [key: string]: string } = { | |
'á': 'a', | |
'à': 'a', | |
'ó': 'o', | |
'é': 'e', | |
'ç': 'c', | |
'ã': 'a', | |
'¿': '?', | |
'o': 'o', |
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
type JsonLike = { | |
[key: string]: string | number | undefined | null | JsonLike; | |
}; | |
const getCircularReplacer = () => { | |
const seen = new WeakSet(); | |
return (_, value: JsonLike) => { | |
if (typeof value === 'object' && value !== null) { | |
if (seen.has(value)) { |
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 | |
# Branch Removing Tool | |
LIST=$(cat ./list.txt) | |
while read -r item; do | |
echo "Current item: $item" | |
done <<<"$LIST" | |
printf "> All done. Goodbye. \n\n" | |
exit |
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
# bash | |
python -m http.server 9000 --directory . |
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 const isAFunction = (e: unknown) => e && typeof e === "function"; | |
export interface GenericObject { | |
[key: string]: unknown; | |
} | |
export type ExecutedPromiseResponse<R> = [ | |
data: R | null, | |
error: GenericObject | null | |
]; |
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
# PORT=8000 | |
python -m SimpleHTTPServer 8000 # $PORT |
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
const url2JSON = source => { | |
const obj = { | |
source, | |
props: {}, | |
keysList: [], | |
valuesList: [] | |
}; | |
const arr = source.split('?'); |
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 | |
while read -r branch; | |
do echo "deleting: $branch"; | |
git branch -D $branch; | |
done <<< `git branch | grep 'bugfix'` |
NewerOlder