Skip to content

Instantly share code, notes, and snippets.

jQuery.ajax({
type: 'GET', //metodo, assim como em forms, GET ou POST
url: '/sistemas/siteadmin/dao/DAOAgendaSemanal.class.php', //página de processamento
data: 'agendaSemanal='+id, //recupera o valor selecionado nesse elemento
dataType: 'json'
})
.done(function(data){ console.log(data) });
<?php
setlocale(LC_ALL, 'pt_BR');
$dtInicio = DateTime::createFromFormat('d/m/Y', '01/02/2016');
$dtFim = DateTime::createFromFormat('d/m/Y', '03/06/2016');
$intervalo = new DateInterval('P1D');
$diasAulas = array('Seg', 'Qua', 'Sex');
$dtAulas = array();
while ($dtInicio->getTimeStamp() <= $dtFim->getTimeStamp()) {
var jqxhr = $.post( "example.php", function() {
alert( "success" );
})
.done(function() {
alert( "second success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
@adirkuhn
adirkuhn / php-lint-pre-commit.sh
Created April 18, 2018 11:22 — forked from filipekiss/php-lint-pre-commit.sh
A *really* simple git pre-commit-hook that lints all staged PHP files.
#!/bin/bash
stagedFiles=$(git diff-index --cached HEAD | grep ".php" | grep "^:" | cut -f2);
phpLintErrors=0
echo "PHP will now lint all the php staged files..."
echo ""
for file in $stagedFiles
do
echo "PHP is linting $file...";
echo ""
php -l $file
<?php
namespace School;
use School\Persistence\GroupStore;
use School\Persistence\PupilStore;
use School\Model\TooManyPupilsException;
class GroupService
{

Keybase proof

I hereby claim:

  • I am adirkuhn on github.
  • I am adirkuhn (https://keybase.io/adirkuhn) on keybase.
  • I have a public key whose fingerprint is 3D81 2B58 A0AB 21ED 4727 6521 1488 38FA 95DB 7183

To claim this, I am signing this object:

attempt correct pin
'336238', '2530', '3536686', '3536686', '3974'
'336241', '8612', '3536686', '3536686', '3974'
'336244', '8612', '3536686', '3536686', '3974'
'336247', '8612', '3536686', '3536686', '3974'
'336253', '8612', '3536686', '3536686', '3974'
'336256', '2530', '3536686', '3536686', '3974'
'358159', '8612', '3722260', '3722260', '8677'
'358162', '8612', '3722260', '3722260', '8677'
'358501', '8612', '3723859', '3723859', '4708'
<?php
//first you need to retrieve the jsessionid and javax.ViewState
$url = 'https://www.visaovip.com/lista-preco';
$handle = curl_init($url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($handle, CURLOPT_HEADER, 1);
$result = curl_exec($handle);
@adirkuhn
adirkuhn / test
Last active April 30, 2021 10:54
<script>alert('hihihi');</script>