Skip to content

Instantly share code, notes, and snippets.

Avatar

Roberto Santalla roobre

View GitHub Profile
View gist:fc003cf6a33ddf6f016c7e6a15c01ac3
title categories date tags
Pasta carbonara de chorizo
Comidas
2002-07-22
pasta
chorizo
@roobre
roobre / plubio.py
Last active Jul 21, 2020
Cute clock module hand curated by Plubio
View plubio.py
#!/usr/bin/env python3
import re
from twitter_scraper import get_tweets
for tweet in get_tweets('cosmicgazer_', pages=3):
if re.search('\d{1,2}:\d{1,2}', tweet['text']):
print(tweet['text'][:16])
break
@roobre
roobre / qemu.sh
Created Jul 3, 2020
Libvirt qemu hook
View qemu.sh
#!/bin/bash
PINNED=2-7,10-15
UNPINNED=0-1,8-9
if [[ $2 == "start" ]]; then
echo "Allocating hugepages..."
#hp 16 || ( echo "Could not allocate hugepages" >&2 && exit 1 )
echo "Stopping sanoid"
@roobre
roobre / lookup.go
Last active Jun 1, 2020
Script marronero para buscar passwords en diccionarios
View lookup.go
package main
import (
"bufio"
"compress/gzip"
"os"
"fmt"
"strings"
"sync"
)
View togglegov.sh
#!/bin/bash
if [[ -n $1 ]]; then
[ "root" != "$USER" ] && exec sudo $0 "$@"
read current < /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
read -ra available < /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
next="x"
for i in `seq 0 ${#available[@]}`; do
@roobre
roobre / WinvirtExpress.xml
Last active Jul 2, 2020
VFIO libvirt configuration
View WinvirtExpress.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit WinvirtExpress
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>WinvirtExpress</name>
<uuid>REDACTED</uuid>
View Winvirt.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit Winvirt
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>Winvirt</name>
<uuid>9148a19a-2cd4-48d4-b6ed-fc778ffe7415</uuid>
View wrongstatuses.go
package main
import (
"bufio"
"compress/gzip"
"encoding/base64"
"encoding/json"
"fmt"
"log"
"net/http"
@roobre
roobre / aesctr.go
Created Apr 14, 2018
Encrypt/Decrypt a file with AES-CTR
View aesctr.go
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"github.com/urfave/cli"
@roobre
roobre / dark-tweetdeck-tweaks.css
Last active Oct 24, 2019
Stylish snippet to make tweetdeck dark theme prettier and more consistent
View dark-tweetdeck-tweaks.css
@-moz-document domain("tweetdeck.twitter.com") {
.compose-text-container,
.js-quote-tweet-holder,
.compose-reply-tweet > .tweet-body > .js-tweet-text,
.js-compose-text,
.js-in-reply-to,
.js-in-reply-to {
color: #ddd;
background-color: rgb(64, 69, 82) !important;
}
You can’t perform that action at this time.