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 | |
// load JWT class | |
// Class can be found here: https://github.com/firebase/php-jwt | |
include __DIR__.'/JWT.class.php'; | |
$JWT = new JWT(); | |
// Zendesk provides a timestamp in the get. | |
$now = (!empty($_GET['timestamp'])) ? $_GET['timestamp'] : time(); |
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
function getData() { | |
var deferred = $.Deferred(); | |
$.ajax({ | |
'url': 'http://google.com', | |
'success': function(data) { | |
deferred.resolve('yay'); | |
}, | |
'error': function(error) { | |
deferred.reject('boo'); |
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
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm | |
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm | |
sudo yum install nano | |
sudo yum install centos-release-scl | |
sudo yum install devtoolset-4-toolchain.x86_64 | |
scl enable devtoolset-4 bash | |
sudo yum install httpd php70w.x86_64 php70w-mbstring.x86_64 php70w-intl.x86_64 php70w-gd.x86_64 php70w-cli.x86_64 php70w-pear php70w-devel php70w-pdo unixODBC-devel |
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 | |
require '../vendor/autoload.php'; | |
require_once 'Config.php'; | |
if(PHP_DEBUG_MODE){ | |
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
} | |
// authorized user id from db - global var |
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
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<title>Dinamicos</title> | |
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/jQuery-Validation-Engine/2.6.4/validationEngine.jquery.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jQuery-Validation-Engine/2.6.4/jquery.validationEngine.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jQuery-Validation-Engine/2.6.4/languages/jquery.validationEngine-es.js"></script> | |
<style> |
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 | |
foreach($_POST['prod'] as $key => $val){ | |
echo "codigo: ".$val['codigo']; | |
echo "<br>"; | |
echo "cantidad: ".$val['cantidad']; | |
echo "<br>"; | |
echo "---------------------------"; | |
echo "<br>"; | |
} |
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
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<title>Dinamicos</title> | |
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/jQuery-Validation-Engine/2.6.4/validationEngine.jquery.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jQuery-Validation-Engine/2.6.4/jquery.validationEngine.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jQuery-Validation-Engine/2.6.4/languages/jquery.validationEngine-es.js"></script> | |
<style> |
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
import requests | |
import bs4 | |
import unicodecsv | |
import re | |
s = requests.Session() | |
payload = {'Rut': 'XX.XXX.XXX-X', 'Clave': 'XXXXX','IDPERFIL': 2, 'ButtonClick': 'Ingresar','Pagina': 1,'OrdenadoPor': 1,'EsAscendente': 'True'} | |
paginas = s.post('http://aplicaciones.sence.cl/DeclaracionJurada/Identificacion', data=payload) | |
cookies = s.cookies |
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
require 'ruby-nfc' | |
require 'logger' | |
$logger = Logger.new(STDOUT) | |
def p(str) | |
$logger.debug str | |
end | |
readers = NFC::Reader.all |
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 | |
class CalendarEvent { | |
/** | |
* | |
* The event ID | |
* @var string | |
*/ | |
private $uid; |
NewerOlder