Skip to content

Instantly share code, notes, and snippets.

View jemekite's full-sized avatar

Jemekite jemekite

View GitHub Profile
@jemekite
jemekite / gist:2b3e31fba88585dbade4cef654e7de23
Created August 17, 2023 12:15
Split video for whatsapp status usnig FFMpeg
ffmpeg -i input.mp4 -c copy -map 0 -segment_time 29 -reset_timestamps 1 -f segment output%01d.mp4
@jemekite
jemekite / sync-passwords.sh
Created December 2, 2022 00:53 — forked from ZviBaratz/sync-passwords.sh
Simple passwords file synchronizer using Rclone
#!/bin/bash
# Important note:
# If you don't synchronize but then edit the other file,
# the newer modification time on the second file edited
# will cause data to be overridden.
# The solution would be to merge manually
# (Database --> Merge from database).
@jemekite
jemekite / rrm.bat
Created August 15, 2022 00:17
Reset Reliability Monitor
:: Created by: Kapil Arya
:: Corresponding Article: http://www.thewindowsclub.com/
reg add "HKLM\SOFTWARE\Microsoft\Reliability Analysis\WMI" /v WMIEnable /T REG_DWORD /D 1 /F
del /f /S /Q /A "%ProgramData%\Microsoft\RAC\PublishedData\*"
del /f /S /Q /A "%ProgramData%\Microsoft\RAC\StateData\*"
@echo off
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
@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.
@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 / 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 / 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 / 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 / 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