This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="float: left;"><img style="width: 53px; height:48px;" src="http://1.bp.blogspot.com/_dsEG33PDaHw/TJvkySNSsAI/AAAAAAAAAXo/xwOjSE9l92c/s1600/stats.png"/></div> | |
<div style=" float: left; text-align: left; font-size:12px;"> | |
<script> function DiasOnline(Dia, Mes, Year, Texto) { Meses = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); Hoy = new Date(); Inicio = Date.parse(Meses[Mes - 1] + " " + Dia + " " + Year); Resultado = Math.round((Hoy.getTime() - Inicio) / 86400000); document.write(Resultado + " " + Texto); } DiasOnline(22, 1, 2009, "" );</script> días online<br/> | |
<script style="text/javascript"> | |
function showpostcount(json) { | |
document.write(parseInt(json.feed.openSearch$totalResults.$t,10)); | |
}</script> | |
<script src="http://bradanovic.blogspot.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script> entradas | |
<br/> | |
<script src="http://bradanovic.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showpostcount"></script> comen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Abuelos-extraer, programa para sacar texto esogido | |
#de un archivo de grande | |
manf = open("3DOC.txt") # nombre del archivo grande original | |
fsal = open('salida.txt', 'w') # nombre del archivo de salida | |
contador= 1 | |
for linea in manf: # lee cada línea del archivo y la almacena en la variable linea | |
if not "ancestro" or not "generaciones" in linea : continue # selecciona las líneas a extraer | |
linea = str(contador)+" "+linea · les antepone un número correlativo | |
fsal.write(linea) # escribe la línea seleccionada en el archivo de salida |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instalar motion | |
sudo apt-get install motion | |
# Chequear si la cámara es compatible con Raspberry | |
lsusb | |
# el comando muestra lo que está conectado a las puertas USB se conecta la cámara al puerto USB | |
# y chequeamos para ver si aparece. Si no estamos seguros, desconectamos la cámara y nos fijamos | |
# si algún dispositivo desaparece al hacer lusb nuevamente | |
# Ajustar la configuración | |
sudo nano /etc/motion/motion.conf | |
# Buscar con Ctrl+W los comandos y cambiarlos cuando proceda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
PARA CAMBIAR EL SISTEMA DE MANERA QUE ARRANQUE DESDE UN PENDRIVE (Raspberrry 3) | |
De https://www.fororaspberry.es/viewtopic.php?t=1901 | |
################################################################################ | |
sudo apt-get update | |
sudo BRANCH=next rpi-update | |
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt | |
vcgencmd otp_dump | grep 17: | |
sudo umount /dev/sda | |
sudo parted /dev/sda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Suponiendo que la IP del router es 192.168.0.1 que eth0 es la red cableada | |
# que 192.168.0.2 es la IP estática que queremos asignar y que 255.255.255.0 es la net mask | |
sudo nano -w /etc/network/interfaces | |
# al archivo que se abre le agregamos las siguientes líneas | |
auto eth0 | |
iface lo inet loopback | |
iface eth0 inet static | |
address 192.168.0.2 | |
netmask 255.255.255.0 | |
gateway 192.168.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import serial | |
arduino = serial.Serial('/dev/ttyACM0', 9600) | |
print("Starting!") | |
arduino.write("L") #Mandar un comando hacia Arduino | |
print('LED APAGADO') | |
arduino.close() #Finalizamos la comunicacion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import serial | |
arduino = serial.Serial('/dev/ttyACM0', 9600) | |
while True: | |
print "LED encendido" | |
arduino.write("H") #Mandar un comando hacia Arduino | |
# arduino.close() #Finalizamos la comunicacion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<?php | |
if (isset($_POST['LedON'])) | |
{ | |
$output = array(); | |
exec("python /var/www/html/raspduino/enciendeled.py", $output); | |
echo $output[0]; | |
} | |
if (isset($_POST['LedOFF'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$output = array(); | |
exec("python /var/www/html/PRUEBASPHP/holamundo.py", $output); | |
echo $output[0]; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
print "HOLA MUNDO; Soy Python me han llamado desde PHP" |
NewerOlder