Blog 2020/9/1
<- previous | index | next ->
updated 2025/4/2
| #! /usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| guitarix_pgm = "guitarix -N -p 7000" | |
| import socket, json, os, time, signal | |
| import sys, tty, termios | |
| from subprocess import check_output | |
| class _Getch: |
Blog 2020/9/1
<- previous | index | next ->
updated 2025/4/2
| Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
| ActivityTweet | |
| generic_activity_highlights | |
| generic_activity_momentsbreaking | |
| RankedOrganicTweet | |
| suggest_activity | |
| suggest_activity_feed | |
| suggest_activity_highlights | |
| suggest_activity_tweet |
| # NO SIRVE DE NADA BORRAR TU HISTORIAL, seguirá en el canal 48 horas | |
| # disponible para cualquiera que quiera recuperarlo :P | |
| from telethon import TelegramClient, events, sync | |
| from telethon.tl.types import InputChannel, PeerChannel | |
| from telethon.tl.types import Channel | |
| import time | |
| api_id = 'XXXXXX' | |
| api_hash = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' |
| import datetime | |
| from telethon import TelegramClient | |
| api_id = 123456789 | |
| api_hash = 'abcdef123456789' | |
| client = TelegramClient('session_name', api_id, api_hash) | |
| client.session.report_errors = True | |
| client.start() |
| #!/bin/bash | |
| # | |
| # WP-UTD | |
| # WordPress Up To Date 0.1, May 25 2012 | |
| # by Marcos BL; No license, feel free use it | |
| # | |
| # WP-UTD checks all your local WordPress installations are | |
| # up-to-date and notifies you by email if a new version | |
| # is available. | |
| # |
| random_pitch() { | |
| local delta=${1:-50} | |
| local value=$(( ($RANDOM % $delta) - $delta/2 )) | |
| echo "+${value}" | sed 's/+-/-/' | |
| } | |
| glados() { | |
| local pitch=70 | |
| local speed=180 | |
| local lang=en |
| # µPing (MicroPing) for MicroPython | |
| # copyright (c) 2018 Shawwwn <[email protected]> | |
| # License: MIT | |
| # Internet Checksum Algorithm | |
| # Author: Olav Morken | |
| # https://github.com/olavmrk/python-ping/blob/master/ping.py | |
| # @data: bytes | |
| def checksum(data): | |
| if len(data) & 0x1: # Odd number of bytes |
| # Voidlinux PR guide | |
| ## Useful hints | |
| > Use just one commit per PR | |
| ### Correct a wrong commit | |
| ``` | |
| $ git commit --amend | |
| ``` |
| #!/usr/bin/env bash | |
| # requires jq | |
| DISPLAY_CONFIG=($(i3-msg -t get_outputs | jq -r '.[]|"\(.name):\(.current_workspace)"')) | |
| for ROW in "${DISPLAY_CONFIG[@]}" | |
| do | |
| IFS=':' | |
| read -ra CONFIG <<< "${ROW}" | |
| if [ "${CONFIG[0]}" != "null" ] && [ "${CONFIG[1]}" != "null" ]; then |