Skip to content

Instantly share code, notes, and snippets.

View JosXa's full-sized avatar
💙

Joscha Götzer JosXa

💙
View GitHub Profile
@JosXa
JosXa / youtube-feed-filter.user.js
Last active September 11, 2021 13:56
Youtube Feed Filter
// ==UserScript==
// @name Youtube Feed Filter
// @version 0.1
// @description Filters Youtube Videos in the 'My Subscriptions'-Page
// @require http://code.jquery.com/jquery-latest.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @include *youtube.com/watch*
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_setValue
// ==UserScript==
// @name Youtube Feed Filter
// @version 0.1
// @description Filters Youtube Videos in the 'My Subscriptions'-Page
// @require http://code.jquery.com/jquery-latest.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @include *youtube.com/*
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_setValue
@JosXa
JosXa / open_in_same_tab.user.js
Created May 11, 2016 23:08
Userscript forcing all websites to open links in the same tab. Useful for google, which seems to open a new tab every time you click a link.
// ==UserScript==
// @name Open links in same tab
// @namespace
// @version 1.0
// @description Description
// @require http://code.jquery.com/jquery-latest.js
// @include *
// ==/UserScript==
$(document).ready(function(){
import numpy as np
import pandas as pd
import json
#import ast
import os
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Simple Bot to reply to Telegram messages
# This program is dedicated to the public domain under the CC0 license.
"""
This Bot uses the Updater class to handle the bot.
First, a few handler functions are defined. Then, those functions are passed to
the Dispatcher and registered at their respective places.
Then, the bot is started and runs until we press Ctrl-C on the command line.
@JosXa
JosXa / util.py
Last active January 11, 2017 18:52
Final Version
import html
import re
import copy
def parse_markdown_from_update(update):
entities = copy.deepcopy(parse_entities_from_update(update))
text = escape_markdown(message_text_from_update(update))
for e in entities:
@JosXa
JosXa / cVimrc
Last active January 12, 2017 04:02
map <M-h> previousTab
resolving dependencies...
looking for conflicting packages...
Packages (6) babl-0.1.18-1 gegl02-0.2.0-7 lcms-1.19-5 libspiro-1:0.5.20150702-1 libwmf-0.2.8.4-14 g
Total Download Size: 13.15 MiB
Total Installed Size: 71.94 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
resolving dependencies...
looking for conflicting packages...
Packages (6) babl-0.1.18-1 gegl02-0.2.0-7 lcms-1.19-5 libspiro-1:0.5.20150702-1 libwmf-0.2.8.4-14 g
Total Download Size: 13.15 MiB
Total Installed Size: 71.94 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
@JosXa
JosXa / helpers.py
Last active January 17, 2017 16:32
#!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2016
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.