-
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
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'); | |
} |
#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); |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
import os, sys | |
a = 23 | |
b = 23 | |
lista = [23,32,43,54,63,72,84,93,102] | |
print(sys.version) |
#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/ |
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.
<?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; |
#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.
#!/usr/bin/perl | |
####### DON'T MODIF IT or SCRIPT NOT WORK ####### | |
$powered="Shanti"; # | |
$mail="[email protected]"; # | |
################################################# | |
################################################ | |
use HTTP::Request; # | |
use HTTP::Request::Common; # | |
use HTTP::Request::Common qw(POST); # | |
use LWP::Simple; # |