Skip to content

Instantly share code, notes, and snippets.

View xMajedz's full-sized avatar
💭
I can't code help

majed xMajedz

💭
I can't code help
View GitHub Profile
#fix xfce keyring crap
--password-store=basic
@xMajedz
xMajedz / newsboat_config
Last active January 8, 2019 17:26 — forked from anonymous/gist:42d2f5956e7bc8ee1ebc
moved to dotfiles
show-keymap-hint false
browser "/usr/bin/chromium"
html-renderer "/usr/bin/elinks -dump"
external-url-viewer "/usr/bin/urlview"
feedlist-format "%3n %t [%U / %c]"
articlelist-format "%4f %D %t"
feedlist-title-format "[%u / %t]"
articlelist-title-format "[%u / %t] - %T - %U"
@xMajedz
xMajedz / mpvhistory.lua
Last active November 12, 2018 15:04 — forked from garoto/mpvhistory.lua
Simple media logger Lua script for mpv
-- Not my code: originally from https://redd.it/3t6s7k (author deleted; failed to ask for permission).
-- Only tested on Windows. Date is set to dd/mmm/yy and time to machine-wide format.
-- Save as "mpvhistory.lua" in your mpv scripts dir. Log will be saved to mpv default config directory.
-- Make sure to leave a comment if you make any improvements/changes to the script!
-- Changed HISTFILE Path and Name
local HISTFILE = (os.getenv('APPDATA') or os.getenv('HOME')..'/.mpv')..'/history';
mp.register_event('file-loaded', function()
local title, logfile;
@xMajedz
xMajedz / userChrome.css
Last active April 18, 2018 14:10
Firefox Simple Theme
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#TabsToolbar, #sidebar-header, #back-button, #forward-button, #identity-box, #page-action-buttons
{ visibility:collapse !important; }
#nav-bar, #navigator-toolbox { background-color:rgb(25, 25, 25)!important; }
#urlbar { background-color:rgb(25, 25, 25)!important;
border-width:0px !important; }
'{"DEFAULT": "https://searx.neocities.org/?q={}", "ddg": "https://duckduckgo.com/?q={}", "s": "https://www.startpage.com/do/search/?q={}", "yndx": "https://www.yandex.com/search/?text={}", "mailru": "https://go.mail.ru/search?q={}", "w": "https://en.wikipedia.org/wiki/?search={}", "wig": "https://wiki.installgentoo.com/?search={}", "wa": "https://wiki.archlinux.org/?search={}", "libgen": "https://libgen.pw/search?q={}", "pdfdrive": "https://www.pdfdrive.net/search?q={}", "gh": "https://github.com/search?q={}", "copr": "https://copr.fedorainfracloud.org/coprs/fulltext/?fulltext={}", "gplay": "https://play.google.com/store/search?q={}", "yt": "https://www.youtube.com/results?search_query={}", "myzuka": "https://myzuka.club/Search?searchText={}", "kimcartoon": "http://kimcartoon.me/Search/Cartoon/{}", "9cartoon": "http://www.9cartoon.me/Search?s={}", "dws": "https://dwatchseries.to/search/{}", "sws": "https://www1.swatchseries.to/search{}", "btdb": "https://btdb.to/q/{}", "1337x": "https://1337x.to/srch?search={
import requests
from html2text import html2text
from nltk.probability import FreqDist
from nltk.corpus import brown
from collections import Counter
from pickle import dump, load
from wordcloud import WordCloud
from nltk.tokenize import TweetTokenizer
import matplotlib.pyplot as plt
import os
var a = 0, s = 0, m = 0, h = 0, b = window.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist.contents.length;for(i = 0;i < b;i++){var c = window.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist.contents[a].playlistPanelVideoRenderer.lengthText.simpleText, minsec = c.match(/\d+/g), ts = parseInt(minsec[1]), tm = parseInt(minsec[0]), s = s + ts, m = m + tm;if (s >= 60){s = s - 60, m = m + 1}if (m >= 60){m = m - 60, h = h + 1}a = a + 1}console.log(h + 'hours ' + m + 'minutes ' + s + 'seconds');
if(window.top.ytInitialData.contents.twoColumnWatchNextResults != undefined)
{
var a = 0, b = window.top.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist.contents.length;for(i = 0;i < b;i++){var c = window.top.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist.contents[a].playlistPanelVideoRenderer.lengthText.simpleText;console.log(c);a = a + 1;}
}
else if (window.top.ytInitialData.contents.twoColumnBrowseResultsRenderer != undefined)
{
var a = 0, b = window.top.ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].playlistVideoListRenderer.contents.length;for(i = 0;i < b; i++){var c = window.top.ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].playlistVideoListRenderer.contents[a].playlistVideoRenderer.lengthText.simpleText;console.log(c);a = a + 1;}
}
@xMajedz
xMajedz / yt-rss-maker.js
Last active February 4, 2022 14:29
youtube rss link maker (use in the browser console)
var i = window.top.ytInitialData.metadata.channelMetadataRenderer.externalId;console.log("https://www.youtube.com/feeds/videos.xml?channel_id=" + i)