All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code adds custom REST api handler at runtime to a running Streamlit app | |
# | |
from tornado.web import Application, RequestHandler | |
from tornado.routing import Rule, PathMatches | |
import gc | |
import streamlit as st | |
@st.cache_resource() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2017 Théo Chamley | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, merge, | |
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons | |
# to whom the Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# resolves : Is there a way to delete or hide old/renamed Workflows? #26256 | |
# https://github.com/community/community/discussions/26256 | |
from multiprocessing.dummy import Pool as ThreadPool | |
import requests | |
TOKEN = "{YOUR_GH_TOKEN}" | |
OWNER_REPO = "esc5221/example_repo" | |
DELETE_TARGET_RUN_NAME = "{RUN NAME}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import io | |
import pasteboard | |
pb = pasteboard.Pasteboard() | |
pb_image = pb.get_contents(pasteboard.TIFF) | |
if pb_image: | |
image = Image.open(io.BytesIO(pb_image)) | |
if image.mode == 'RGBA': | |
image.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageFont, ImageDraw | |
from collections import namedtuple | |
def position_tuple(*args): | |
Position = namedtuple('Position', ['top', 'right', 'bottom', 'left']) | |
if len(args) == 0: | |
return Position(0, 0, 0, 0) | |
elif len(args) == 1: | |
return Position(args[0], args[0], args[0], args[0]) |
Below describes the only way I was able to get (programmatic) access to the YouTube Analytics API on behalf of our Brand Account. Google documentation is convoluted, to say the least, so if you know a more straightforward way, please do share.
- Create a Project in the Developers Console - https://console.developers.google.com/
- Go to the
Library
tab and enable desired APIs (e.g. YouTube Analytics) - Go to
OAuth consent screen
and make projectexternal
. SelectTest mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To ~/.bashrc file add line: | |
# source ~/.git-plugin-bash.sh | |
# Based on Oh My Zsh Git plugin (without zsh functions): | |
# https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh | |
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git | |
# |
NewerOlder