Skip to content

Instantly share code, notes, and snippets.

View VOID001's full-sized avatar
🏹
Aim highest

Jianqiu Zhang VOID001

🏹
Aim highest
View GitHub Profile
@VOID001
VOID001 / check.py
Last active December 28, 2018 15:29
Arch Linux CN static dependency check
import os
import sys
import importlib.util
import logging
import shlex
import subprocess
from typing import List
import yaml
import pycman.config
@VOID001
VOID001 / screenshot.sh
Created February 23, 2019 03:24
Take screenshot, upload to pastebin and put the URL into your clipboard
#!/bin/bash
/usr/bin/flameshot gui
/usr/bin/notify-send "Taking Screenshot" "Please wait..." --icon=dialog-information
dbus-monitor --profile "type=signal,interface=org.dharkael.Flameshot,member=captureTaken" |
while read -r line; do
if [[ $line == *"captureTaken"* ]]; then
URL=$(/usr/bin/xclip -selection clipboard -t image/png -o > /tmp/shot.png && /usr/bin/curl -F 'name=@/tmp/shot.png' https://img.vim-cn.com/)
echo "$URL" | xclip -in -sel clipboard
/usr/bin/notify-send "Screenshot Uploaded" "$URL" --icon=dialog-information
pkill -P $$