Type | Emoji | code |
---|---|---|
feat | ✨ | :sparkles: |
fix | 🐛 | :bug: |
docs | 📚 | :books: |
style | 💎 | :gem: |
refactor | 🔨 | :hammer: |
perf | 🚀 | :rocket: |
test | 🚨 | :rotating_light: |
build | 📦 | :package: |
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 | |
BOT_TOKEN="<token>" | |
CHAT_ID="<id>" | |
TELEGRAM_USERNAME="<username>" | |
send_telegram_message() { | |
local message="$1" | |
curl -s -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \ | |
-d chat_id="$CHAT_ID" \ |
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
# Pihole /admin/ Fix | |
location / { | |
proxy_pass http://192.168.0.100:1010/admin/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_hide_header X-Frame-Options; | |
proxy_set_header X-Frame-Options "SAMEORIGIN"; | |
proxy_read_timeout 90; | |
} |
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 time | |
import sys | |
from http import HTTPStatus | |
import requests | |
from requests.exceptions import HTTPError | |
url = "https://theurl.com" | |
retries = 3 | |
retry_codes = [ |
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 | |
# fetch csv using wget and write to stdout -> remove header row from the csv -> replace &/- with _ -> select only stock_symbol column -> finally redirect output to a text file | |
# using cut | |
wget -O - https://www1.nseindia.com/content/indices/ind_nifty50list.csv | sed 1d | sed 's/[&-]/_/g' | cut -d ',' -f 3 > "Broad 5 - Microcap 250".txt | |
# using awk | |
wget -O - https://www1.nseindia.com/content/indices/ind_niftymicrocap250_list.csv | sed 1d | sed 's/[&-]/_/g' | awk -F ',' '{print $3}' > "Broad 5 - Microcap 250".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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |