Skip to content

Instantly share code, notes, and snippets.

Avatar
😉
Learning

Meet Gor Mr-Destructive

😉
Learning
View GitHub Profile
View wa-api.sh
#!/usr/bin/env bash
a+=('america' 'africa' 'asia' 'antarctica' 'australia' 'austria' 'aachen' 'aberdeen' 'abu dhabhi' 'addis ababa' 'adelaide' 'aizuwakamatsu' 'aktobe' 'alexandria' 'algeris' 'amandora' 'amsterdam' 'alaska' 'ankara' 'antwerp' 'arad' 'arak' 'athens' 'auckland' 'agra' 'ahmedabad' 'ahmednagar' 'aizwal' 'ajax' 'ajmer' 'akola' 'algeris' 'alwar' 'ambala' 'americana' 'amravati' 'atlanta' 'augusta' 'aurangabad' 'austin' 'amritsar' 'arunachal pradesh' 'assam' 'agartala' 'azerbaijan' 'andhra pradesh' 'andaman islands' 'argentina' 'angola' 'abuja' 'asunican' 'alberta' 'arizona' 'antigua' 'alappuzha' 'alabama' 'andora' 'alicante' 'afghanistan' 'annapolis' 'arkanas city' 'atlantic city' 'augsburg' 'aceh' 'awaji islands' 'akita' 'aomori' 'anantpur')
b+=('bengaluru' 'brisbane' 'botswana' 'bermuda' 'bristol' 'budapest' 'bucharest' 'birmingham' 'bhuj' 'berlin' 'bikaner' 'bhaghdad' 'belgium' 'brazil' 'bulgaria' 'burkina' 'bhutan' 'bhadrak' 'bhubhaneshwar' 'bihar' 'brasilia' 'buenos aires' 'bangladesh' 'beijing
View mdict.sh
#!/bin/bash
read -p "Enter the word to find meaning : " word
output="meaning.txt"
url="https://www.dictionary.com/browse/$word"
curl -o $output $url
clear
grep -oP '(?<=<span class="one-click-content css-nnyc96 e1q3nk1v1">).*?(?=</span>)' $output >temp.txt
sed -i 's/<[^>]*>//g' temp.txt >$output
View crypgfg.sh
#!/bin/bash
function strip_html(){
grep -oP '(?<=<span class="no-wrap" data-price-btc).*?(?=</span>)' $output >temp.txt
sed -i 's/[^>]*>//g' temp.txt >$output
sed -ni '1p' temp.txt >$output
cp temp.txt $output
rm temp.txt
}
View commands.sh
#!/usr/bin/env bash
mkdir $1
cd $1
pip install virtualenv
virtualenv env
source env/bin/activate.sh
pip install django
django-admin startproject $1 .
View commands.bat
mkdir %1
cd %1
pip install virtualenv
virtualenv env
call env\Scripts\activate
pip install django
django-admin startproject %1 .
cls
View crypto.sh
#!/bin/bash
read -p "Enter the coin name : " coin
read -p "Enter your national currency : " crncy
days=0
#read -p "Enter the number of days past today: " days
touch temp.json price.txt
curl -o temp.json -X 'GET' \
'https://api.coingecko.com/api/v3/coins/'$coin'/market_chart?vs_currency='$crncy'&days='$days'' \