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 | |
ARIA_URL="http://127.0.0.1:6800/jsonrpc" | |
SECRET="secret" | |
# Step 1: Retrieve GIDs of failed downloads | |
response=$(curl -s -X POST $ARIA_URL \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"jsonrpc": "2.0", |
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
# Sort first by Word Count and then Characters count - only if it's is <String, String> | |
jq 'to_entries | map({ key: .key, value: .value, word_count: (.value | split(" ") | length), char_count: (.value | length) }) | sort_by(.word_count, .char_count) | from_entries' en.json > sorted_en.json && mv sorted_en.json en.json | |
# Sort first by Word Count, then by Characters count, and then alphabetical - skips collections that are at end | |
jq '. | to_entries | reduce .[] as $entry ( {}; if $entry.value | type == "object" then .collections += [$entry] else .non_collections += [$entry] end ) | (.non_collections | map({ key: .key, value: .value, word_count: (.value | split("\n") | map(split(" ")) | map(length) | add), char_count: (.value | length) }) | sort_by(.word_count, .char_count, .key)) + .collections | from_entries' en.json > sorted_en.json && mv sorted_en.json en.json |
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 planCards = document.querySelectorAll('#service-list .uk-card'); | |
const cardDetails = []; | |
function convertPersianNumbersToEnglish(text) { | |
return text.replace(/[۰-۹]/g, (char) => String.fromCharCode(char.charCodeAt(0) - '۰'.charCodeAt(0) + '0'.charCodeAt(0))); | |
} | |
planCards.forEach(card => { | |
const title = convertPersianNumbersToEnglish(card.querySelector('.uk-card-title').textContent.trim()); | |
const description = convertPersianNumbersToEnglish(card.querySelector('.uk-card-body p').textContent.trim()); |
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 | |
url="https://github.com/<owner>/<repo>/releases/latest/download/<file_name_with_extension>" | |
current_file="<filename>.<extension>" | |
if [ -f "$current_file" ]; then | |
new_checksum=$(curl -L "$url.sha256" | cut -d " " -f 1) | |
current_checksum=$(shasum -a 256 "$current_file" | cut -d " " -f 1) | |
# Compare the two checksums |
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
import hashlib | |
import os | |
import requests | |
# ============== Variables ============== | |
url = "https://ws.alibaba.ir/api/v1/flights/domestic/available/" | |
telegram_token = "" # os.environ["TOKEN"] | |
chat_id = "" # os.environ["CHAT_ID"] | |
searches = [ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import tweepy | |
import os | |
import json | |
client = tweepy.Client( | |
'TWITTER_KEY', | |
wait_on_rate_limit=True | |
) | |
user_response = client.get_user(username='TWITTER_USERNAME') |
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 | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title bonbast | |
# @raycast.mode inline | |
# @raycast.refreshTime 3h | |
# Optional parameters: | |
# @raycast.icon 💰 |
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
cookies = Object.fromEntries(document.cookie.split('; ').map(c => c.split('='))); | |
let UDID = cookies.UDID; | |
let jwt = cookies[['jwt-access_token']] ?? JSON.parse(window.localStorage.JWT ?? '{}').access_token; | |
var myHeaders = new Headers(); | |
myHeaders.append("authority", "snappfood.ir"); | |
myHeaders.append("accept", "application/json, text/plain, */*"); | |
myHeaders.append("accept-language", "en-US,en;q=0.9,fa;q=0.8"); | |
myHeaders.append("authorization", "Bearer " + jwt); | |
myHeaders.append("content-type", "application/x-www-form-urlencoded"); |
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 | |
issuer_id="9f4xxxx-xxxx-xxxx-xxxx-xxxxxxxxx" | |
key_id="2F9XXXXXXX" | |
key_path="./private_keys/AuthKey_2F9XXXXXXX.p8" | |
expiration_time=$(date -v +60S +%s) | |
function base64_urlsafe { | |
base64 | tr -d '\r\n=' | tr '+/' '-_' | |
} |
NewerOlder