Skip to content

Instantly share code, notes, and snippets.

View roobre's full-sized avatar

Ro Santalla roobre

View GitHub Profile

Keybase proof

I hereby claim:

  • I am roobre on github.
  • I am roobre (https://keybase.io/roobre) on keybase.
  • I have a public key whose fingerprint is A496 F1A3 052B C199 42FF 78EE 0E19 86A3 593E 6226

To claim this, I am signing this object:

@roobre
roobre / php.conf
Last active March 31, 2016 11:07
Nginx config for wordpress
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
@roobre
roobre / aesctr.go
Created April 14, 2018 14:57
Encrypt/Decrypt a file with AES-CTR
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"github.com/urfave/cli"
package main
import (
"bufio"
"compress/gzip"
"encoding/base64"
"encoding/json"
"fmt"
"log"
"net/http"
<!--
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>
@roobre
roobre / togglegov.sh
Created August 14, 2019 16:54
Togglegov
#!/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 / dark-tweetdeck-tweaks.css
Last active October 24, 2019 08:54
Stylish snippet to make tweetdeck dark theme prettier and more consistent
@-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;
}
@roobre
roobre / lookup.go
Last active June 1, 2020 20:18
Script marronero para buscar passwords en diccionarios
package main
import (
"bufio"
"compress/gzip"
"os"
"fmt"
"strings"
"sync"
)
@roobre
roobre / qemu.sh
Created July 3, 2020 20:44
Libvirt qemu hook
#!/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 / plubio.py
Last active July 21, 2020 13:04
Cute clock module hand curated by Plubio
#!/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