Skip to content

Instantly share code, notes, and snippets.

View f3270's full-sized avatar

Fernando Torres f3270

View GitHub Profile
@f3270
f3270 / gist:4469ab481e4e71357bc1968ae6163911
Created November 27, 2017 18:17 — forked from arunoda/gist:7790979
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

#!/bin/bash
RUN=1 # 1 to execute | 0 to dry mode (show commands but no execution)
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
target[0]="systemctl stop nginx.service"
target[1]="systemctl stop mariadb.service "
target[2]="yum update -y"
/*
-- iot_thingspeak-v3.0.ino --
Este código fue probado con éxito subiendo datos random() al canal MNVTR7ETZTHHAOH7
(de prueba) usando el IDE Arduino 1.6.5 y sirve para que el mismo módulo wifi lea
los datos del sensor (digitales, no análogos).
El código tiene marcado los lugares a editar importantes con "EDIT HERE".
Para que compile el código seguir los siguiente pasos:
#!/bin/bash
# install-workbench.sh
# installs mysql-workbench-community-6.3.8 con F25
wget http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-6.3.8-1.fc24.x86_64.rpm
sudo dnf -y install \
ncurses-compat-libs \
unixODBC \
#!/bin/bash
if [ $# -eq 1 ]; then
TARGET_DIR=$(echo $1 | sed 's/$/.git/')
echo -n "Verifying \"$TARGET_DIR\" ... "
if [ -d $TARGET_DIR ]; then
echo "failed! Repository already exists!"
exit 1
else
#!/bin/bash
target[0]='*~'
target[1]='*.swp'
target[2]='.DS_Store'
target[3]='*.log'
target[4]='*.out'
target[5]='*.aux'
target[5]='*.synctex.gz'
@f3270
f3270 / mount_hd.sh
Created May 22, 2015 17:30
Script to mount HD on RPi and (optionally) play music
#!/bin/bash
#./bin/mount_hd.sh -- mounts a HD and (optionally) runs cmus on it
UUID="634bd86b-3ad2-432a-89e0-285ec09bf5c0"
UUID_PATH=$(echo "/dev/disk/by-uuid/$UUID")
MUSIC_FLAG=0
DEST_PATH="/mnt/hd1"
while [ $# -gt 0 ] ## check for options
do

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@f3270
f3270 / aur_install.md
Last active August 29, 2015 14:05
Install AUR packages (Archlinux)

How to install packages from AUR (Archlinux)

Originally taken from link

Install the build essentials. These are needed to compile packages on Arch Linux ARM.

$ sudo pacman -S kernel26-headers file base-devel abs

@f3270
f3270 / Markdown Cheatsheet.md
Last active August 29, 2015 14:02
Markdown Cheatsheet