Skip to content

Instantly share code, notes, and snippets.

Chris Braun cryzed

Block or report user

Report or block cryzed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View comixology-to-ubooquity.py
#!/usr/bin/env python
import argparse
import collections
import functools
import json
import os
import random
import re
import time
View test.py
def take_window_screenshot(window_id, decoration_level=None):
primary_screen = QApplication.primaryScreen()
pixmap = primary_screen.grabWindow(window_id)
decoration_level = decoration_level if decoration_level is not None else get_window_manager_decoration_level()
# No decoration known, so simply return the regular pixmap
if not decoration_level:
return pixmap
decorated_geometry = xpybutil.window.__get_geometry(_get_nth_parent_window(window_id, decoration_level))
decorated_pixmap = primary_screen.grabWindow(_DESKTOP_WINDOW_ID, *decorated_geometry)
View oof.py
import collections
import functools
from typing import Any, Dict, Iterable, Mapping, Optional
import box
import yaml
from fanfare.paths import defaults_config_path, user_config_path
View mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector --age 6 --country Germany --latest 30 --number 20 --sort rate --save /etc/pacman.d/mirrorlist -p https -p https -p https
# When: 2019-07-13 11:02:13 UTC
# From: https://www.archlinux.org/mirrors/status/json/
# Retrieved: 2019-07-13 11:02:07 UTC
# Last Check: 2019-07-13 10:46:43 UTC
View gist:8b3253f0c32094133f1ce1ceb37f2595
[ 3482.081778] VFS: busy inodes on changed media or resized disk sdf
[ 3482.159247] print_req_error: I/O error, dev sdf, sector 1
[ 3482.159264] FAT-fs (sdf): bread failed in fat_clusters_flush
[ 3482.159364] print_req_error: I/O error, dev sdf, sector 0
[ 3482.159391] FAT-fs (sdf): unable to read boot sector to mark fs as dirty
View main_view.enaml
import os
from enaml.image import Image
from enaml.widgets.api import Action, Container, ImageView, Label, MainWindow, Menu, MenuBar, StatusBar, StatusItem, FileDialogEx
enamldef MainWindow(MainWindow): window:
title << 'Image Viewer - %s' % os.path.basename(folder.path) if folder.path else 'Image Viewer'
attr folder
View folder_model.py
import os
import magic
from atom.api import Atom, Bytes, Int, List, Str, observe
from enaml.image import Image
# https://pypi.org/project/natsort/
from natsort import natsorted
class ImageFolder(Atom):
View image_viewer.py
import argparse
import os
import enaml
from enaml.qt.qt_application import QtApplication
from enaml.widgets.api import Action
from folder_model import ImageFolder
argument_parser = argparse.ArgumentParser()
View ungoogled-chromium-extension-updater.py
import argparse
import json
import os
import posixpath
import shutil
import subprocess
import tempfile
import requests
View glassbox
#!/usr/bin/env python
import argparse
import collections
import itertools
import os
import shlex
import stat
import subprocess
import sys
You can’t perform that action at this time.