Skip to content

Instantly share code, notes, and snippets.

View jemekite's full-sized avatar

Jemekite jemekite

View GitHub Profile
@jemekite
jemekite / wosign.ca-bundle
Created May 17, 2015 12:37
WoSign ca-bundle
-----BEGIN CERTIFICATE-----
MIIFrDCCA5SgAwIBAgIQOPZFweJdkSzOOys5EjF0DTANBgkqhkiG9w0BAQsFADBV
MQswCQYDVQQGEwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxKjAoBgNV
BAMTIUNlcnRpZmljYXRpb24gQXV0aG9yaXR5IG9mIFdvU2lnbjAeFw0xNDExMDgw
MDU4NThaFw0yOTExMDgwMDU4NThaMFUxCzAJBgNVBAYTAkNOMRowGAYDVQQKExFX
b1NpZ24gQ0EgTGltaXRlZDEqMCgGA1UEAxMhV29TaWduIENBIEZyZWUgU1NMIENl
cnRpZmljYXRlIEcyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA47SA
DmswUIIvH+edv/h8QiXtrmHE64aHI38RH8CTXxuSkB53jLx29/sKpdV9rNxLGNhY
Lt9GazQPRWRghMLrmg5R1CpUUT4nO2Rohm98awA8mfZMqEUnraXLKzftWcNSTE/e
NJzyt9H6WMvlYp5VRly3xY04JDXvlyx8ZRAN75+XCNXlsxJ6kt3+iA+PpK+9xdY2
@jemekite
jemekite / dbbackup.sh
Created June 3, 2015 13:34
Dump every databases on the server
#!/bin/bash
USER="root"
PASSWORD="[yourpass]"
ExcludeDatabases="Database|information_schema|performance_schema|mysql"
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | egrep -v $ExcludeDatabases`
for db in $databases; do
echo "Dumping database: $db"

Keybase proof

I hereby claim:

  • I am jemekite on github.
  • I am jemekite (https://keybase.io/jemekite) on keybase.
  • I have a public key whose fingerprint is 273D EAE2 A1CC 1100 A3A1 6D5D E665 7991 9875 C3A6

To claim this, I am signing this object:

@jemekite
jemekite / badbot.conf
Created July 25, 2015 13:28
NginX badbot blocker conf
if ($http_user_agent ~ "WebCrawlerJohn|Sphere|OptimizationCrawler|Apache-HttpClient|LinkpadBot|MegaIndex.ru|WeCrawlForThePeace|Xenu|SemanticScholarBot|Domain Re-Animator Bot|proximic|Sosospider|Sogou|Jorgee|ZumBot|MJ12bot|spbot|rojerbot|Exabot|dotbot|gigabot|AhrefsBot|accelobot|searchmetrics|awcheckBot|CompSpyBot|EasouSpider|purebot|Ezooms|SurveyBot|sitebot|dotnetdotcom|dotbot|SolomonoBot|ZmEu|lipperhey|WBSearchBot|Snoopy|AhrefsBot|DinoPing|dataprovider.com|discoverybot|www.integromedb.org|360Spider|80legs|YamanaLab-Robot|ip-web-crawler.com|Aboundex|Sleuth|NCBot|JikeSpider|Curious|visaduhoc.info|SemrushBot|Dow Jones Searchbot|SISTRIX|brandwatch.net|magpie-crawler|YoudaoBot|TurnitinBot|aiHitBot|PeoplePal|EzineArticlesLinkScanner|ProCogSEOBot|ScreenerBot|PagesInventory|SeznamBot|libwww-perl|Lynx|Nutch|Java|SEOstats|Python-urllib|python-requests|HTTP_Request|HTTP_Request2|Zend_Http_Client|Jakarta Commons-HttpClient|The Incutio XML-RPC PHP Library|YisouSpider|SEOENGWorldBot|Netseer|Riddler|CLIPish|proximic|Mail.R
@jemekite
jemekite / clean.php
Created October 9, 2015 17:56
Clean URL
function cleanURL($string)
{
$url = str_replace("'", '', $string);
$url = str_replace('%20', ' ', $url);
$url = preg_replace('~[^\\pL0-9_]+~u', '-', $url); // substitutes anything but letters, numbers and '_' with separator
$url = trim($url, "-");
$url = iconv("utf-8", "us-ascii//TRANSLIT", $url); // you may opt for your own custom character map for encoding.
$url = strtolower($url);
$url = preg_replace('~[^-a-z0-9_]+~', '', $url); // keep only letters, numbers, '_' and separator
return $url;
@jemekite
jemekite / ffencode.txt
Created January 15, 2018 15:32
ffmpeg preserve metadata
ffmpeg -i input.mp4 -vcodec h264 -acodec aac -map_metadata 0 output.mp4
@jemekite
jemekite / AuthyToOtherAuthenticator.md
Created September 8, 2018 10:29 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@jemekite
jemekite / bitcoin_core_0.19.1.bash
Created June 4, 2020 02:17 — forked from Koff/bitcoin_core_26.1.bash
Bitcoin core 0.19.1 on Ubuntu 19.10
# Assuming a fresh install of Ubuntu 19.10, 400+Gbytes of free HDD, and that you are logged in as root.
# More detailed instructions available in https://www.fsanmartin.co/running-a-bitcoin-node-on-ubuntu-19-10/
# Update packages
apt update
apt upgrade -y
# Add bitcoin_user user non-interactively
adduser --gecos "" bitcoin_user
@jemekite
jemekite / resetpermission.txt
Created June 5, 2022 14:49
Quickly Reset NTFS Permissions in Windows 10
To reset NTFS Permissions in Windows 10, do the following.
1. Open an elevated command prompt.
2. Run the following command to reset permissions for a file: icacls "full path to your file" /reset.
3. To reset permissions for a folder: icacls "full path to the folder" /reset.
4. To reset permissions for a folder, its files, and subfolders, run the command icacls "full path to the folder" /reset /t /c /l.
Substitute the example paths with the actual values matching your system.