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
--ignore-gpu-blocklist | |
--enable-gpu-rasterization | |
--enable-zero-copy | |
--enable-features=VaapiVideoDecoder | |
--disable-features=UseChromeOSDirectVideoDecoder | |
--use-gl=desktop |
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
import random | |
UNMISTAKABLE_CHARS = '23456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijkmnopqrstuvwxyz' | |
def meteor_id(chars_count=17, prefix=""): | |
"""Create an id such as the ones Meteor creates | |
Reference implementation: https://github.com/meteor/meteor/blob/3a2867fc15/packages/random/AbstractRandomGenerator.js | |
""" |
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
import json | |
import os.path | |
import httpx | |
context_path = os.path.expanduser("~/.qovery/context.json") | |
with open(context_path) as context_file: | |
context = json.load(context_file) | |
client = httpx.Client( |
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 | |
# Collect DBUS_SESSION_BUS_ADDRESS from running process | |
function set_dbus_adress | |
{ | |
USER=$1 | |
PROCESS=$2 | |
PID=`pgrep -o -u $USER $PROCESS` | |
ENVIRON=/proc/$PID/environ |
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
@hook.subscribe.float_change | |
def center_window(): | |
client = qtile.current_window | |
if not client.floating: | |
return | |
screen_rect = qtile.current_screen.get_rect() | |
center_x = screen_rect.x + screen_rect.width / 2 | |
center_y = screen_rect.y + screen_rect.height / 2 |
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/sh | |
DAEMON="/home/et/etded" | |
DAEMON_OPT="+set net_port 27960 +set fs_game etpro +exec server" | |
DAEMON_USER="et" | |
DAEMON_NAME="etded.x86" | |
DAEMON_DESC="Wolfenstein Enemy Territory server" | |
PATH="/sbin:/bin:/usr/sbin:/usr/bin" |
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 libqtile import qtile | |
@hook.subscribe.client_killed | |
def fallback(window): | |
if window.group.windows != {window}: | |
return | |
for group in qtile.groups: | |
if group.windows: | |
qtile.current_screen.toggle_group(group) |
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 | |
date=$(date --rfc-3339=date) | |
mkdir "dump-$date" | |
cd "dump-$date" | |
gphoto2 --auto-detect | |
gphoto2 --get-all-files --skip-existing | |
cd - |
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 copy import deepcopy | |
from pprint import pprint | |
import boto3 | |
client = boto3.client('route53') | |
def get_values(record): | |
values = record.get("ResourceRecords") |
NewerOlder