This file contains hidden or 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
from pathlib import Path | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
#Se crea el objeto de eventos a monitorear | |
class MyEventHandler(FileSystemEventHandler): | |
def on_modified(self, event): | |
print(event.src_path, "modificado.") | |
This file contains hidden or 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
Update debian 9 a 10 | |
https://www.cyberciti.biz/faq/update-upgrade-debian-9-to-debian-10-buster/ | |
Instalar Proxmox en Debian 10 | |
https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Buster | |
#https://pve.proxmox.com/wiki/Network_Configuration | |
Elimine la red de la eth0 (IP y Subred) desde la pagina web y agrebhe una vmbr0 con los datos del eth0 | |
haciendo un brige desde la eth0 |
This file contains hidden or 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
int irPin1=7; | |
int irPin2=8; | |
int count=0; | |
boolean state1 = true; | |
boolean state2 = true; | |
boolean insideState = false; | |
boolean outsideIr=false; | |
boolean isPeopleExiting=false; | |
int i=1; | |
void setup() { |
This file contains hidden or 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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains hidden or 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
#!/bin/bash | |
# First go to GoDaddy developer site to create a developer account and get your key and secret | |
# | |
# https://developer.godaddy.com/getstarted | |
# Be aware that there are 2 types of key and secret - one for the test server and one for the production server | |
# Get a key and secret for the production server | |
# | |
#Update the first 4 variables with your information |
This file contains hidden or 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
function fechaMexCRM(fecha, tipo){ | |
var tc = new Date().toString().split("GMT")[1].split(" ")[0].replace(/0/g,""); | |
if (tipo === 'get'){ | |
var tc = tc*1; | |
} else { | |
var tc = tc*-1; | |
} | |
if (tipo === 'X'){ | |
fechahora = fecha.split(' '); |
This file contains hidden or 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
<script language="Javascript"> | |
// <![CDATA[ | |
function ZEBI(cardnumber) { | |
var first = cardnumber.charAt(0); | |
var second = cardnumber.charAt(1); | |
var third = cardnumber.charAt(2); | |
var fourth = cardnumber.charAt(3); | |
var cardnumber = (cardnumber + '').replace(/\\s/g, ''); //remove space | |
if ((/^(417500|(4917|4913|4026|4508|4844)\d{2})\d{10}$/).test(cardnumber) && cardnumber.length == 16) { |
This file contains hidden or 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
$post = array( | |
'post_author' => $user_id, | |
'post_content' => '', | |
'post_status' => "publish", | |
'post_title' => $product->part_num, | |
'post_parent' => '', | |
'post_type' => "product", | |
); | |
//Create post |
This file contains hidden or 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 | |
$xml = simplexml_load_file('test.xml'); | |
$ns = $xml->getNamespaces(true); | |
$xml->registerXPathNamespace('c', $ns['cfdi']); | |
$xml->registerXPathNamespace('t', $ns['tfd']); | |
//EMPIEZO A LEER LA INFORMACION DEL CFDI E IMPRIMIRLA | |
foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){ | |
echo $cfdiComprobante['version']; |
This file contains hidden or 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
//Function | |
function csv($array) { | |
$csv = ""; | |
for( $i = 0; $i < count($array); $i++ ) { | |
$csv .= '"' . str_replace('"', '""', $array[$i]) . '"'; | |
if( $i < count($array) - 1 ) $csv .= ","; | |
} | |
return $csv; | |
} |
NewerOlder