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 sys | |
import time | |
import json | |
import requests | |
API_KEY = "bes5VlOjJoyrXx6O" | |
def fetch(session, artist_id, page): | |
response = session.get( |
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/env python | |
# usage: mitmdump -s httpdump.py "~ts application/json" | |
# | |
# options: | |
# - dumper_folder: content dump destination folder (default: ./httpdump) | |
# - open_browser: open integrated browser with proxy configured at start (default: true) | |
# | |
# remember to add your own mitmproxy authorative certs in your browser/os! | |
# certs docs: https://docs.mitmproxy.org/stable/concepts-certificates/ | |
# filter expressions docs: https://docs.mitmproxy.org/stable/concepts-filters/ |
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
#!/bin/bash | |
# brew install xbar jq | |
# pip install astro-cli | |
PATH=$PATH:/usr/local/bin | |
ASTRO=$(pyenv which astro) | |
$ASTRO --date "a week ago" -f json moon phases | jq -r "first | .emoji" | |
echo "---" | |
echo "phases | size=10" |
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
let more = true | |
let data = [] | |
let offset = 0 | |
let next = "" | |
while (more) { | |
console.log(`Fetch offset: ${offset}`) | |
var req = new XMLHttpRequest(); | |
req.open("GET", `https://www.pedidosya.com.ar/my-orders/api/orders?mock=false&previous=${next}&from=&to=&ordersState=`, false); | |
req.send(null) |
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
curl -sL whatthecommit.com | htmlq "#content p:first-child" -tw | sed '/^$/d' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/bin/bash | |
# battery monitor systemd suspend/resume hook | |
LOGFILE=/var/log/battery.csv | |
KERNEL=$(uname -r) | |
BIOS=$(dmidecode -s bios-version) | |
log() { | |
cd /sys/class/power_supply |
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
>>> class A(): | |
...: def uno(self): | |
...: print("A uno") | |
>>> class B(): | |
...: def uno(self): | |
...: print("B uno") | |
...: def dos(self): | |
...: print("B dos") | |
...: |
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
# /etc/acpi/events/thinkpad-hotkeys | |
event=ibm/hotkey | |
action=/etc/acpi/thinkpad-hotkeys.sh %e |
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
# particion swap size = ram | |
# gettear UUID con blkid | |
# en /etc/grub/default agregar, | |
# quiet splash resume=UUID=<UUID-swap-partition> | |
# sudo update-grub | |
# sudo vim /etc/polkit-1/localauthority.conf.d/10-hibernate.conf | |
[Re-enable hibernate by default for login1] | |
Identity=unix-user:* | |
Action=org.freedesktop.login1.hibernate |