Skip to content

Instantly share code, notes, and snippets.


Giovanni Aguirre giobyte8

View GitHub Profile
giobyte8 /
Created Dec 2, 2014
Metodos para manipular archivos, comparar y sincronizar dos directorios
package sincronizador;
import java.util.ArrayList;
import javax.swing.JOptionPane;
giobyte8 / sp
Created Dec 18, 2018 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
View sp
#!/usr/bin/env bash
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
giobyte8 / queryParamReader.js
Created Aug 23, 2018
Read query param from javascript
View queryParamReader.js
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
giobyte8 /
Created Oct 22, 2017
Basic AT commands for ESP8266
# Ping message
# Change BAUD range
# Check SDK version
giobyte8 / primer.cpp
Last active May 28, 2017
A C++ program to determinate prime numbers
View primer.cpp
#include <iostream>
using namespace std;
int main() {
int n;
// Solicita al usuario el número de primos deseados
cout << "¿Cuántos números primos desea calcular? ";
cin >> n;
giobyte8 / vimrc
Last active Nov 12, 2016
My personal .vimrc
View vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
giobyte8 / behaviorsYii2.php
Last active Feb 11, 2016
Autentication example
View behaviorsYii2.php
public function behaviors()
return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
array( // Logged users (Admin & Capturista)
'actions' => [
giobyte8 / simpleLogin.html
Last active Jan 3, 2016
Este gist muestra como utilizar el API de Microsoft Skydrive para hacer login con la cuenta de algún usuario. El código es para fines de aprendizaje, posiblemente en un ambiente de producción se requieran algunas validaciones adicionales.
View simpleLogin.html
La siguiente pagina, muestra de manera sencilla como permitir al usuario hacer login
mediante su cuenta Microsoft a traves del API de Microsoft Live.
-@author: Aguirre Alvarez J Giovanni.
-Created on: January, 12 from 2014.
<!DOCTYPE html>
giobyte8 / gulpfile.js
Last active Oct 7, 2015 — forked from wesbos/gulpfile.js
FAST Browserify + Reactify + Babelify
View gulpfile.js
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');
giobyte8 /
Last active Sep 10, 2015 — forked from mbn18/gist:0d6ff5cb217c36419661
How to install nsenter on Ubuntu 14.04
# Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
# I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
# Note - its also possible to run nsenter from a container (didn't tried)
# start a container
docker run --name nsenter -it ubuntu:14.04 bash
## in the docker
apt-get update
apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool