Skip to content

Instantly share code, notes, and snippets.

View arieljannai's full-sized avatar

Ariel Jannai arieljannai

View GitHub Profile
@arieljannai
arieljannai / vlc-corner-view.ahk
Created September 26, 2020 14:16
Opens VLC in a small video in the top right corner, with always-on-top and minimal-interface (clipboard/arg)
; Verify that you have AutoHotKey on your computer
; Save the script to your desired location, preferably in the path
; Calling the script:
; If no args: taking from clipboard (`vlc-corner-view.ahk`)
; If with one arg: using that argeument (`vlc-corner-view.ahk path-to-video`)
if (%0%=0) {
Run, vlc.exe --no-video-deco --qt-minimal-view --video-on-top --autoscale --no-qt-video-autoresize "%clipboard%"
} else {
Run, vlc.exe --no-video-deco --qt-minimal-view --video-on-top --autoscale --no-qt-video-autoresize "%1%"
@arieljannai
arieljannai / export-visible-join-requests.js
Last active November 29, 2019 00:35
Export the visible join requests of the group
// Instructions
// 1. Go the the requests page of your group
// 2. Filter as you wish to
// 3. Scroll to the bottom to load all the requests
// 4. Open DevTools (F12)
// 5. Change the second parameter at the end from false to true if you wish to automatically open all the chats
// 6. Run the script
// 7. The output is now copied to your clipboard
// Send messages quickly
@arieljannai
arieljannai / mass-archive-messenger-conversations.js
Last active July 17, 2018 21:30
Shitty mass archiving Facebook messenger conversations
// 1. Open https://www.messenger.com/
// 2. Scroll to the bottom until all converstations are loaded, and run this from the console.
var converstaionsNumber = document.querySelectorAll('[aria-label="Conversation actions"]').length - 1;
function archiveLast() {
document.querySelectorAll('[aria-label="Conversation actions"]')[converstaionsNumber--].click();
setTimeout(function() {
var button = document.getElementsByClassName('_54nh')[1];
if (button.textContent != "Archive") {
@arieljannai
arieljannai / get_youtube_channel_rss_feed.js
Last active May 13, 2022 11:20
Get YouTube Channel RSS Feed
for (var arrScripts = document.getElementsByTagName('script'), i = 0; i < arrScripts.length; i++) {
if (arrScripts[i].textContent.indexOf('externalId') != -1) {
var channelId = arrScripts[i].textContent.match(/\"externalId\"\s*\:\s*\"(.*?)\"/)[1];
var channelRss = 'https://www.youtube.com/feeds/videos.xml?channel_id=' + channelId;
var channelTitle = document.title.match(/\(?\d*\)?\s?(.*?)\s\-\sYouTube/)[1];
console.log('The rss feed of the channel \'' + channelTitle + '\' is:\n' + channelRss);
break;
}
}
@arieljannai
arieljannai / ffmpeg-commands-list.cmd
Last active December 13, 2017 06:51
ffmpeg commands
ffmpeg -i movie.mov -vcodec h264 -acodec aac -strict -2 movie.mp4
ffmpeg.exe -i movie.mp4 -vf scale=854:480 movie_2.mp4
ffmpeg.exe -i audio -acodec libmp3lame audio.mp3
@arieljannai
arieljannai / sound.cmd
Last active January 27, 2018 19:53
Change the system sound
@echo off
rem 65536 is 100%
rem device where zero is the default device
rem left and right
rem reference: http://nircmd.nirsoft.net/setvolume.html or http://nircmd.nirsoft.net/setsysvolume.html
rem supports whole numbers only therefore throws "missing operator" error when specifying 655.36
IF [%1]==[] goto usage
IF "%1"=="/?" goto usage
@arieljannai
arieljannai / restore_focus_zazu_closed.ahk
Last active April 29, 2017 22:13
Restore the focus to the previous window after Zazu being un-active (not in focus)
zazu:
ZazuDetails = ahk_exe Zazu.exe
IfWinActive, %ZazuDetails%
{
WinWaitClose, %ZazuDetails%
Send, {AltDown}{Tab}{AltUp}
}
Goto, zazu
#!/usr/bin/env bash
# based on https://github.com/ltalirz/moodle-qformat_qtex/blob/master/moodle-converter/moodle_question_converter.sh
function usage {
printf \
"usage: %s <URL to Moodle> <username> <password> <input file>\n" $(basename $0)
exit 1
}
nCommandLineArgs=$#
@arieljannai
arieljannai / pycharm.bat
Created January 8, 2017 11:07
Add PyCharm to context menu (right click menu)
@echo off
@rem throw this file in jetbrains installation folder, it takes the last created PyCharm folder (the latest ide update) for the script
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "PyCharm*"') DO SET a=%%i
SET PyCharmPath=C:\Program Files (x86)\JetBrains\%a%\bin\PyCharm64.exe
echo %PyCharmPath%
echo Adding file entries
@arieljannai
arieljannai / user.js
Created September 17, 2016 23:55
user.js scripts repo
// telegram
// ebay
// threadless
// scripts:
// https://github.com/arieljannai/tampermonkey-scripts