Skip to content

Instantly share code, notes, and snippets.

🐧
I have no idea what I'm doing

Eduardo Mínguez e-minguez

🐧
I have no idea what I'm doing
Block or report user

Report or block e-minguez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@e-minguez
e-minguez / numbers.sh
Last active Aug 29, 2015
random number fm stream
View numbers.sh
#!/bin/sh
# Like lost numbers, but random :)
VOICE="es"
FREQ="101.6"
SPEEDMIN=100
SPEEDMAX=150
TYPEMIN=1
TYPEMAX=7
NUMMIN=1
NUMMAX=100
@e-minguez
e-minguez / disable_bluetooth.sh
Created Aug 11, 2014
Disable bluetooth on thinkpad x230 at boot with systemd and tmpfiles
View disable_bluetooth.sh
echo "w /proc/acpi/ibm/bluetooth - - - - disable" >> /etc/tmpfiles.d/disable-bluetooth.conf
@e-minguez
e-minguez / retroarch.cfg
Created Mar 6, 2015
My /opt/retropie/configs/all/retroarch.cfg
View retroarch.cfg
core_options_path = /opt/retropie/configs/all/retroarch-core-options.cfg
system_directory = /home/pi/RetroPie/roms/../BIOS
config_save_on_exit = false
video_threaded = true
video_smooth = false
video_aspect_ratio = 1.33
video_shader_dir = /opt/retropie/emulators/RetroArch/shader/
input_autodetect_enable = true
joypad_autoconfig_dir = /opt/retropie/emulators/RetroArch/configs/
input_player1_a = x
@e-minguez
e-minguez / get_constants
Created Jun 8, 2015
Get all constants in a bash script
View get_constants
cat ${FILE} | grep -o "\"*\$[{]*[[:upper:]]\{1,\}.*[}]*\"*" | sed -e 's|\(.*\):.*|\1|g' -e 's|[\"|{|\$]||g' -e 's|\(.*\)[[:blank:]].*|\1|g' -e 's|\(.*\)}.*|\1|g' -e 's|\(.*\)[[:blank:]]\].*|\1|g' | sort | uniq | grep -v [[:lower:]] | tr '\r\n' ' '
View vagrant_tips.md

~/.bashrc

Just configure a few default variables to store vagrant images in a custom path, and set libvirt as default provider

# Vagrant stuff
export VAGRANT_DEFAULT_PROVIDER=libvirt
export VAGRANT_HOME=/storage/vagrant
@e-minguez
e-minguez / resourcenode.sh
Created Sep 14, 2015
one liner to get the node running a specific service in pacemaker
View resourcenode.sh
echo "cat /crm_mon/resources/resource[@id='RESOURCENAME']/node/@name" | xmllint --nocdata --shell <(pcs status xml) | awk -F= '/name/ { print $2 }' | tr -d '"'
View telcrap.sh
#!/bin/bash
mkdir -p {images,final}
cd $1
for i in *.pdf
do
convert -density 400 -flatten ${i} ${i}.png
convert ${i}.png -crop 2550x1780+375+200 -resize 50% ${i}_ok.png
View keybase.md

Keybase proof

I hereby claim:

  • I am e-minguez on github.
  • I am eminguez (https://keybase.io/eminguez) on keybase.
  • I have a public key whose fingerprint is 3FE2 FE2D 1256 C9F8 64EE 31C0 7C91 D6AD F693 A6D0

To claim this, I am signing this object:

View gimxstatus.py
#!/bin/python
import os
import time
import RPi.GPIO as GPIO
# set GPIO pin 7 as output
GPIO.setmode(GPIO.BCM)
GPIO.setup(7, GPIO.OUT)
GPIO.setup(18, GPIO.IN, pull_up_down = GPIO.PUD_UP)
View vagrant_skel
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Number of virtualized CPUs
VM_CPU = ENV['VM_CPU'] || 2
# Amount of available RAM
VM_MEMORY = ENV['VM_MEMORY'] || 6144
# Validate required plugins
You can’t perform that action at this time.