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 os | |
| import random | |
| import requests | |
| import tweepy | |
| import PIL | |
| from PIL import Image | |
| from PIL import ImageColor | |
| from PIL import ImageFile | |
| # keys |
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 | |
| aws-profile () { | |
| local current=$AWS_PROFILE | |
| local new | |
| if (( $# == 0 )) ; then | |
| declare suggest=("profile1" "profile2" "profile3" "profile4") | |
| echo -e "\nselect a new profile\ncurrent: \x1b[33m\"$current\"\x1b[0m" | |
| new=$(printf "%s\n" "${suggest[@]}" | fzf --height 5) | |
| else |
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
| /** | |
| * Generates a check digit from a partial EAN13. | |
| * | |
| * https://www.gs1.org/services/how-calculate-check-digit-manually | |
| * | |
| * @param {string} barcode - 12 digit EAN13 barcode without the check digit | |
| */ | |
| function checkDigitEAN13(barcode) { | |
| const sum = barcode.split('') | |
| .map((n, i) => n * (i % 2 ? 3 : 1)) // alternate between multiplying with 3 and 1 |
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 | |
| export PS1="\[\e[31m\]♥\[\e[m\] \w " |
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
| [user] | |
| email = 31383109+furudean@users.noreply.github.com | |
| name = Merilynn Bandy | |
| signingkey = 3D463BCC4E2C6CE1 | |
| [commit] | |
| gpgsign = true | |
| [pull] | |
| rebase = true | |
| [rebase] | |
| autoStash = 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
| import { DocumentClient, } from "aws-sdk/clients/dynamodb"; | |
| import { chunk } from "lodash"; | |
| const dynamoDb = new DocumentClient(); | |
| const sourceTable = ''; | |
| const destinationTable = ''; | |
| const chunkSize = 25; | |
| const sleepTime = 1000; |
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 { writable } from "svelte/store" | |
| /** | |
| * @template {unknown} T | |
| * | |
| * @typedef {Object} Options | |
| * | |
| * @property {T} start_value | |
| * Initial value of the store, if there is nothing in `Storage`. | |
| * |
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 packmanga | |
| for file in */ | |
| set base (basename $file) | |
| echo "Pack '$base'" | |
| cd $base | |
| zip -q "../$base.cbz" * | |
| cd .. | |
| end | |
| end |
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 get(obj, path, defaultValue) { | |
| return path.reduce((o, key) => o[key] ?? defaultValue, obj); | |
| } |
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 mod(a, n) { | |
| return ((a % n) + n) % n | |
| } | |
| export function rot(str, shift) { | |
| const a = "a".charCodeAt(0) | |
| const z = "z".charCodeAt(0) | |
| const A = "A".charCodeAt(0) | |
| const Z = "Z".charCodeAt(0) |
OlderNewer