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 | |
/** | |
* Reconstói todo o conteúdo HTML sob $node; | |
* em resumo, isso funciona como innerHTML do Javascript | |
* | |
* @param DOMNode $node | |
* @return string Conteúdo HTML reconstruído | |
*/ | |
function dom_reconstruct(DOMElement $node){ |
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 | |
#coding: utf-8 | |
"""Captura os links de download direto do portal hyuugadownloads.com.br. | |
$ hyuuga.py --help | |
""" | |
import sys | |
import os | |
import tempfile | |
import argparse | |
import urllib2 |
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 | |
include ('simple_html_dom.php'); | |
$html = file_get_html('http://172.16.1.15/web/guest/en/websys/status/getUnificationCounter.cgi'); | |
$found = $html->find(".staticProp", 1); # retorna um objeto não iterável ou NULL | |
if (!$found) { | |
exit("Nenhum elemento encontrado!"); | |
} |
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
# use src/Mailer/MailerInterface | |
class MailerService | |
{ | |
public function sendMail(MailerInterface $mailer) | |
{ | |
//... | |
} | |
} | |
# use Illuminate\Contracts\Mailer |
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
/* Faça um programa em Linguagem C que leia uma matriz de | |
ordem 100 (ou seja 100x100) composta por números inteiros positivos | |
e escreva qual o maior número de fibonacci da coluna coluna, onde coluna é o | |
numero inteiro informado pelo usuário. | |
*/ | |
#include <stdio.h> | |
int isFibonacci(n) { |
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 os | |
import os.path as path | |
htmlroot = '/home/martins/Desktop/htmltest' | |
asset_replacements = { | |
'http://symfony.com/js/v5/all.js': '{}_static/all.js', | |
'http://symfony.com/css/compiled/v5/all.css': '{}_static/all.css' | |
} | |
def calculate_relative_path_to_root(path, start='html'): |
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
var searcher = new Bloodhound({ | |
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(), | |
queryTokenizer: Bloodhound.tokenizers.whitespace, | |
remote: { | |
url: 'http://host.com/busca?q=%QUERY', | |
wildcard: '%QUERY' | |
} | |
}); | |
var typeahead = $('input.typeahead').typeahead({ |
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
@extends('layouts.base') | |
@section('body') | |
<div class='row'> | |
<div class='col-sm-12'> | |
<div class="row"> | |
<div class="col-sm-12"> | |
<div class="box"> | |
<div class="box-header lightgrey-background"> | |
<div class="title"></div> |
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 sys | |
path = '/tmp/campos.txt' | |
campos = [l.strip().split(',') for l in open(path).readlines()] | |
attrs = ['type', 'null', 'key', 'default', 'extra'] | |
doc_template = """ | |
/** | |
* {} |
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 | |
$imageData = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gBPRmlsZSBzb3VyY2U6IGh0dHA6Ly93d3cud2lraWhvdy5jb20vSW1hZ2U6Q2xlYW4tUmVmcmlnZXJhdG9yLUNvaWxzLVN0ZXAtMi5qcGf/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAHmAtgDAREAAhEBAxEB/8QAHwAAAgMAAwEBAQEAAAAAAAAABwgFBgkDBAoAAQIL/8QAihAAAAQCBAcICwkKBgsLBgEdBAUGBwEDAAgRFQITFBYhMfAJJCVBUWFxgRcjJjQ1RZGhscHREjM2REZVZeHxGCdUVmZ1doWGlSI3Q2SWpShHU1djZ3SHprXFChkyUmJ3hKe2xtVCcnOUl7fCOIKD5eYpOVh4oqSyuMfS1uJoiJKTmKi0xMjX8vb/xAAdAQADAQEBAQEBAQAAAAAAAAAAAwQFBgECBwgJ/8QAYREAAAIFCAcGAwIHDAcGBQMFAAEDBBEh8AUUMUFRYXGBEyQ0kaGxwQIGFdHh8SU1RBJFBxZSVFVydiIjJjI2RlZmdYaSwjNCYmRlgsYIF3eyttJnhZai1kN04keTlaWm/9oADAMBAAIRAxEAPwD0IA5s706fLtr6qc+NAWovx3P6vsoDxNTmXIXwvm4yX9nq289KB6P2V3x1YNJwBFHEC5KtD+H4QK26qY6erLqNRBsx58iA+Me95/TH/wC1pOLANk9NyVxCed6dumzVTVUacugzxrQi5u8wf18Xs8kaVgBOlze17WaPPH1x6qAB2KAWrVR+UJYH2r0fVt0W0AwT0sVipe3LC3zdXqADuSxX |
OlderNewer