Blog 2020/9/1
<- previous | index | next ->
This script downloads one of the QEMU images from https://people.debian.org/~aurel32/qemu/ and boots up a vm.
#!/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 |
# Voidlinux PR guide | |
## Useful hints | |
> Use just one commit per PR | |
### Correct a wrong commit | |
``` | |
$ git commit --amend | |
``` |
# µ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 |
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 |
#!/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. | |
# |
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() |
# 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' |
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 |
Blog 2020/9/1
<- previous | index | next ->
This script downloads one of the QEMU images from https://people.debian.org/~aurel32/qemu/ and boots up a vm.
#! /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: |