Skip to content

Instantly share code, notes, and snippets.

View roobre's full-sized avatar

Ro Santalla roobre

View GitHub Profile
@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 / WinvirtExpress.xml
Last active January 6, 2024 18:35
VFIO libvirt configuration
<!--
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' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>WinvirtExpress</name>
<uuid>1b490ddc-a61b-4dda-997d-917e8e586902</uuid>
<!--
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>
package main
import (
"bufio"
"compress/gzip"
"encoding/base64"
"encoding/json"
"fmt"
"log"
"net/http"
@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"
@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 / 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;
}

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: