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 / bashrc
Created Jun 5, 2014
Useful .basrc alias/functions
View bashrc
http://www.reddit.com/r/linux/comments/27buyv/i_just_leaned_about_man_html/
function yell {
figlet -f slant "$@" | sed "s/\(.\+\)/ \1/g"
}
function manopt {
man $1 | sed 's/.\x08//g' | sed -n "/^\s\+-\+$2\b/,/^\s*$/p" | sed '$d;';
}
@e-minguez
e-minguez / micsshpifm
Created Aug 6, 2014
Send your local mic to pifm through ssh
View micsshpifm
arecord -f S16_LE -r 22500 | ssh -C user@raspberrypi "sudo /home/user/pifm/pifm - 101.6"
@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 fedora-livecd-creator.sh
# install reqs
su -c 'yum -y install fedora-kickstarts livecd-tools'
# create live image
su -c 'livecd-creator -c /usr/share/spin-kickstarts/fedora-install-fedora.ks -d -f filesystem_label --title=syslinux-title --releasever=19 -t tmp --cache=cache --logfile=image_creator.log'
@e-minguez
e-minguez / getyoutube.sh
Created Oct 27, 2013
Get youtube "src" links from an URL
View getyoutube.sh
#!/bin/sh
# Credits to http://blog.viktorkelemen.com/2011/07/get-links-from-page-with-bash.html
URL=$1
curl ${URL} 2>&1 | grep -o -E 'src="http://www.youtube([^"#]+)"' | cut -d'"' -f2
exit 0
You can’t perform that action at this time.