Skip to content

Instantly share code, notes, and snippets.

View rubeniskov's full-sized avatar
:octocat:
decrypting matrix

Rubén López Gómez rubeniskov

:octocat:
decrypting matrix
View GitHub Profile
tempfoo=`basename $0`
TMPFILE=`mktemp /tmp/${tempfoo}` || exit 1
filename=$TMPFILE/$(basename "$(1)")
wget -q -O- $(0) > $filename
echo $filename`
#usage: script resolve-gist-url.sh username <gistname1> <gistname1> ...
#example: resolve-gist-url.sh rubeniskov resolve-gist-url.sh
wget -q -O- "https://api.github.com/users/$1/gists"|grep 'raw_url'|awk -F'"' '{print $4}'|grep -E "$(echo ${@:2}|tr ' ' '|')"

How to programming Arduino through ICSP using a FTDI 232R

Add the follow entry to your avrdude config

vi ~/avrdude.conf
programmer

Burning STM32 Using FTDI R232

Connection

Make sure you have selected the right voltage in the FTDI Chip selector (5V/3.3V), VCC Must be matched with the ouput voltage.

FTDI_R232_UART

FTDI STM32
@rubeniskov
rubeniskov / ffmpeg_rpi_camera.sh
Created August 14, 2018 14:03
ffmpeg raspberry pi camera
sudo apt-get update
sudo apt-get install -y \
libomxil-bellagio-dev \
libvpx-dev
git clone --depth 1 https://github.com/FFmpeg/FFmpeg.git ffmpeg && cd ffmpeg
./configure \
--arch=armel \
--target-os=linux \
--enable-libvpx \
--enable-omx \
apt-get update \
&& apt-get install -yy \
wget \
bzip2 \
autoconf \
gettext \
pkg-config \
build-essential \
libtool \
libomxil-bellagio-dev \
@rubeniskov
rubeniskov / install_golang1.10.sh
Last active June 13, 2018 03:23
Install golang 1.10 from source
GOROOT_BOOTSTRAP=/tmp/go1.4; BASHRC=$(ls ~/.bash*|grep 'rc\|_profile'|head -n1); { \
mkdir -p $GOROOT_BOOTSTRAP; \
curl -s https://dl.google.com/go/go1.4.3.src.tar.gz | tar -zx --strip-components=1 -C $GOROOT_BOOTSTRAP; \
cd $GOROOT_BOOTSTRAP/src && ./make.bash; \
curl -s https://dl.google.com/go/go1.10.3.src.tar.gz | tar -zx -C /tmp/;
cd /tmp/go/src && ./make.bash; mv -f /tmp/go /usr/local/; \
sed -i '/^export GOROOT=/{h;s/=.*/=\/usr\/local\/go/};${x;/^$/{s//export GOROOT=\/usr\/local\/go/;H};x}' ${BASHRC}; \
sed -i '/^export GOPATH=/{h;s/=.*/=${HOME}\/go/};${x;/^$/{s//export GOPATH=${HOME}\/go/;H};x}' ${BASHRC}; \
sed -i '/^export PATH=/{h;s/=.*/=${PATH}:${GOPATH}\/bin/};${x;/^$/{s//export PATH=${PATH}:${GOPATH}\/bin/;H};x}' ${BASHRC}; \
}; source $BASHRC; go version; go env
@rubeniskov
rubeniskov / discover_network_macos.sh
Created June 12, 2018 22:19
Discover network devices macos
ping -c 2 $(ifconfig | grep broadcast|awk '{print $6}') >/dev/null && arp -a
@rubeniskov
rubeniskov / rxjs-node-stream.js
Last active May 20, 2018 00:25
pipe node streams with rxjs
const rxjs = require('rxjs'),
from = require('from2'),
through = require('through2');
const rxStreamDuplex = stream => {
if (stream.pause)
stream.pause();
return source => rxjs.Observable.create(observer => {
function onDataHandler(data) {