Skip to content

Instantly share code, notes, and snippets.

Rodrigo Vazquez rodvan

Block or report user

Report or block rodvan

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
View gist:503b6cd1cb4d74b1d70eea15a8b2f4b5
var mqtt = require('mqtt')
//var Gpio = require('onoff').Gpio; //include onoff to interact with the GPIO
var LEDA = new Gpio(3, 'out'); //use GPIO pin 4, and specify that it is output
var LEDB = new Gpio(4, 'out'); //use GPIO pin 4, and specify that it is output
const say = require('say')
function esperando() {
// stuff you want to happen right away
console.log('Prendiendo foco y esperando 2 segundos');
}
@rodvan
rodvan / smartconfig_save.ino
Last active Jan 24, 2019
SmartConfig ESP8266 save Wifi configuration on Pin0
View smartconfig_save.ino
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
void setup() {
int cnt = 0;
WiFi.mode(WIFI_STA);
Serial.begin(9600);
pinMode(0, INPUT_PULLUP);
Serial.println("2 sec before clear SmartConfig");
delay(2000);
@rodvan
rodvan / bash-cheatsheet.sh
Created Nov 19, 2018 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
View selenium-webdriver-cheatsheet.md

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
View prueba
import os, sys
a = 23
b = 23
lista = [23,32,43,54,63,72,84,93,102]
print(sys.version)
@rodvan
rodvan / .htaccess
Created Apr 3, 2017 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@rodvan
rodvan / gist:6084559f71b2ab78b6ede25ae47bcdd0
Created Dec 18, 2016 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs
View gist:6084559f71b2ab78b6ede25ae47bcdd0

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@rodvan
rodvan / Hackback
Created Jun 26, 2016 — forked from denji/Hackback
Nikto, NMap , Skipfish and friends http://www.security-marathon.be/?p=844
View Hackback
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide for those without the patience to wait for whistleblowers
--[ 1 ]-- Introduction
@rodvan
rodvan / tor_curl.php
Created Jun 27, 2016 — forked from zachflower/tor_curl.php
How To Anonymize PHP cURL Requests Using Tor
View tor_curl.php
<?php
$ip = '127.0.0.1';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) { echo "ERROR: $error_number : $err_string";
return false;
@rodvan
rodvan / PHP-CURL-Tor-Tutorial.md
Created Jun 27, 2016 — forked from sxss/PHP-CURL-Tor-Tutorial.md
PHP: CURL Requests with Tor
View PHP-CURL-Tor-Tutorial.md

#CURL Connections with Tor

Install Apache, PHP, CURL & Tor with apt-get

sudo apt-get install -y apache2 php5 php5-curl tor

Tor creates a proxy on your mashine with port 9050 for SOCKS5 connections.

You can’t perform that action at this time.