View Turkiye-Il-Ilce.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
[ | |
{ | |
"il": "Adana", | |
"plaka": 1, | |
"ilceleri": [ | |
"Aladağ", | |
"Ceyhan", | |
"Çukurova", | |
"Feke", | |
"İmamoğlu", |
View gist:918d93323ad6cef57d6c2a0b11ef65f4
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
# Generated by iptables-save v1.6.1 on Tue May 7 19:15:45 2019 | |
*filter | |
:INPUT DROP [349:29624] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [573:36440] | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 445 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT |
View captcha_readme.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
Include AHGBold.tff | |
Run memcached at default port (11211) | |
Example captcha: https://i.ibb.co/sPQjW0K/index.png |
View format_btc.php
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
<?php | |
function formatBtc($val){ | |
$val = number_format($val, 8); // round to 8 decimal points | |
$rtval = rtrim($val, "0"); // get rid of zeroes at the end | |
$x = strlen($val) - strlen($rtval); // get how many zeroes were deleted | |
if($x > 0){ | |
$rtval .= '<span style="color:#ffffff6f;">'; // start a "faded" <span> | |
// or try class="text-muted" for bootstrap | |
for($i = 0;$i < $x;$i++) // add deleted zeroes back | |
$rtval .= "0"; |
View ilce-listesi.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
[ | |
{"kod":99133,"il_kodu":"1","ad":"Şakirpaşa Havalimanı","il_adi":"ADANA"}, | |
{"kod":2033,"il_kodu":"1","ad":"ÇUKUROVA","il_adi":"ADANA"}, | |
{"kod":2032,"il_kodu":"1","ad":"SARIÇAM","il_adi":"ADANA"}, | |
{"kod":1806,"il_kodu":"1","ad":"İMAMOĞLU","il_adi":"ADANA"}, | |
{"kod":1757,"il_kodu":"1","ad":"ALADAĞ","il_adi":"ADANA"}, | |
{"kod":1748,"il_kodu":"1","ad":"YÜREĞİR","il_adi":"ADANA"}, | |
{"kod":1734,"il_kodu":"1","ad":"YUMURTALIK","il_adi":"ADANA"}, | |
{"kod":1687,"il_kodu":"1","ad":"TUFANBEYLİ","il_adi":"ADANA"}, | |
{"kod":1588,"il_kodu":"1","ad":"SAİMBEYLİ","il_adi":"ADANA"}, |
View spotify-media-key-fix.sh
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
dbus-monitor | grep --line-buffered interface=org.mpris.MediaPlayer2.Player | grep --line-buffered -v spotify | awk -W interactive -F'member=' '{print $2}' | xargs -L1 -I {} dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.{} | |
# when you play another media, and restart spotify, media keys get sent to another destination. | |
# in my case, it was VLC. output from dbus-monitor: | |
# | |
# method call time=1586780292.910122 sender=:1.58 -> destination=org.mpris.MediaPlayer2.vlc serial=1878 path=/org/mpris/MediaPlayer2; interface=org.mpris.MediaPlayer2.Player; member=PlayPause | |
# so I piped together a few commands, which got the wrong dbus output, and forwarded it to spotify. | |
# run: | |
# bash spotify-media-key-fix.sh & |
View multipleevent.py
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
def press_or_text(user_id): | |
return events.Raw(func=lambda e: (type(e) == UpdateNewMessage and e.message.from_id == user_id) or (type(e) == UpdateBotCallbackQuery and e.user_id == user_id and e.data != b'cancel')) | |
whatever = await conv.wait_event(press_or_text(sender)) | |
if type(whatever) == UpdateBotCallbackQuery and whatever.data in [b'create', b'list']: | |
# button clicked | |
# not actual event like "CallbackQuery", you can't use .edit() etc. directly | |
print(whatever.data) | |
else: | |
# message sent |
View netherlands-iban-acc-number-validate.py
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
# Netherlands account number algorithm uses this factor table: | |
# digit | factor | |
# 1st | 10 | |
# 2nd | 9 | |
# ... | |
# 10th | 1 | |
# | |
# After multiplying digits according to the table, sum of these results must be divisible with 11 | |
View decrypt_ruby_MessageEncryptor.py
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 base64 | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
import rubymarshal.reader | |
from pbkdf2 import PBKDF2 | |
SECRET = "a3f58debfe0c5b71edaebea3a627f4f" | |
SALT = "12345" | |
ITERATIONS = 65536 |
View decrypt_ruby_MessageEncryptor.py
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 base64 | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
import rubymarshal.reader | |
from pbkdf2 import PBKDF2 | |
SECRET = "asdasd" | |
ITERATIONS = 65536 | |
KEYLENGTH = 32 |
OlderNewer