i@my-laptop$ ssh -fNTgL port: host:hostport user@server | | | | | | -------------------|------------ | | | | ---|------------------------|------------------------------- | | | | | | ---------------- ------------- -------------- | | | | | v v v v v
This file contains hidden or 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
#!/usr/bin/nu | |
let dev = '/sys/class/backlight/acpi_video0/brightness' | |
let back = '/tmp/backlight' | |
gdbus monitor -y -d org.freedesktop.login1 | |
| each { |line| | |
^echo ($line | parse -r ''LockedHint': <(?P<locked>\w+)>' | get 0.locked) | |
| into bool | |
| if $in { |
This file contains hidden or 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
#!/usr/local/bin/python3 | |
import iterm2 | |
# This script was created with the "basic" environment which does not support adding dependencies | |
# with pip. | |
async def main(connection): | |
# Your code goes here. Here's a bit of example code that adds a tab to the current window: | |
app = await iterm2.async_get_app(connection) | |
tab = app.current_terminal_window.current_tab |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"net" | |
"net/http" | |
"os" | |
) | |
func main() { |
This file contains hidden or 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 aiohttp | |
import asyncio | |
import os | |
import re | |
from pathlib import Path | |
ROOT_URL = 'https://www.instagram.com/' | |
PROXY = 'http://127.0.0.1:1080' | |
HEADERS = { | |
'User-Agent': |
This file contains hidden or 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 | |
from collections import defaultdict | |
from itertools import cycle | |
from termcolor import colored | |
from terminaltables import SingleTable | |
colors = ['green', 'yellow', 'magenta', 'cyan', 'white'] | |
random.shuffle(colors) | |
colors = cycle(colors) |
This file contains hidden or 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 threading import Thread | |
from queue import Queue | |
from time import sleep | |
queue = Queue(maxsize=4) | |
EXIT_FLAG = object() | |
def producer(): |