Skip to content

Instantly share code, notes, and snippets.

import os
import datetime
import praw
reddit = praw.Reddit(
client_id='...',
client_secret='...',
user_agent='RedditUserHistory.py',
username='...',
password='...'
#!/bin/python3
# To install:
# EDITOR=nano sudoedit /usr/local/bin/apt
# Paste script with (Ctrl+Shift+V), then run following to make it executable:
# sudo chmod +x /usr/local/bin/apt
import os, sys
import re
import argparse
// In: ~/.local/share/plasma/plasmoids/com.github.zren.tiledmenu/contents/ui/SearchView.qml
// https://github.com/Zren/plasma-applet-tiledmenu/blob/master/package/contents/ui/SearchView.qml#L237
SearchField {
id: searchField
visible: !config.isEditingTile && !!text
height: config.searchFieldHeight
anchors.left: parent.left
anchors.right: parent.right
listView: stackView.currentItem && stackView.currentItem.listView ? stackView.currentItem.listView : []
import QtQuick 2.0
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.draganddrop 2.0 as DragAndDrop
import org.kde.plasma.private.kicker 0.1 as Kicker
/*
* Copyright 2016 Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
import requests
import os
import json
os.makedirs('data', exist_ok=True)
# https://docs.gitlab.com/ee/api/projects.html
# https://docs.gitlab.com/ee/api/README.html#keyset-based-pagination
nextLink = 'https://invent.kde.org/api/v4/projects?pagination=keyset&per_page=50&order_by=id&sort=asc'
pageNum = 1
@Zren
Zren / nightcolor.py
Last active December 25, 2023 06:31
import dbus
from enum import Enum
import argparse
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('temp',
type=int,
help='NightTemperature (eg: 4200)',
)
parser.add_argument('-d', '--delta',
// ==UserScript==
// @name Resize YT To Window Size
// @description Moves the YouTube video to the top of the website and fill the window with the video player.
// @author Chris H (Zren / Shade)
// @license MIT
// @icon https://s.ytimg.com/yts/img/favicon_32-vflOogEID.png
// @homepageURL https://github.com/Zren/ResizeYoutubePlayerToWindowSize/
// @namespace http://xshade.ca
// @version 125
// @include http*://*.youtube.com/*
import QtQuick 2.4
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import org.kde.kirigami 2.12 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore
GridLayout {
id: testing
columns: 2
@-moz-document url-prefix("https://www.youtube.com/playlist?list=WL") {
/*
@media (max-width: 1024px) {
ytd-playlist-sidebar-renderer { display: none !important; }
ytd-two-column-browse-results-renderer { padding-left: 0 !important; }
}
*/
ytd-playlist-sidebar-renderer {