Skip to content

Instantly share code, notes, and snippets.

View nailton's full-sized avatar

Nailton nailton

View GitHub Profile
<?php
try {
$arquivos = parsePostSegundaEtapa();
// echo $_SESSION['imagen'];
$path = realpath(dirname(__FILE__)) . "/../../images/upload/";
die($path);
// -- Criando o diretório de armazenamento dos anexos da proposta
if (!is_dir($path)) {
mkdir($path, 0777, true);
}
{
"auto_upgrade_last_run": null,
"installed_packages":
[
"All Autocomplete",
"BracketHighlighter",
"Clipboard History",
"Comment-Snippets",
"EditorConfig",
"Emmet",
<?php
/*
Plugin Name: Plugin Rss with thumbnails
Plugin URI:
Description: Esse plugin é um feed-reader como outro qualquer, porém, ele apresenta também os thumbnails presentes no feed
Author: Rodrigo Morbach
Version: 1
Author URI: http://www.mundodosaber.com.br/
*/
<?php
$cURL = curl_init('http://www.exemplo.com.br/enviaPost.php');
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$post = array(
'nome' => 'Renan Martins Pimentel',
'email' => 'contato@renanmpimentel.com.br',
'mensagem' => 'Agora eu sei usar o cURL, demais!'
);
@nailton
nailton / .editorconfig
Created March 2, 2014 19:38
.editorconfig for twitter bootstrap
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
#!/usr/bin/env ruby
require 'gosu' # gem install gosu --no-document
include Gosu
$dimension, $splits = 200, 20
$size = $dimension.to_f / $splits.to_f
class Worm
attr_writer :dir
def initialize() reset end
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.marcado{background-color:#C1FFC1 !important;}
.remover{ display:none;}
table.tableizer-table {
@nailton
nailton / pesquisa2.html
Created April 24, 2014 19:55
Simples pesquisa dentro de uma tabela de dados via jquery.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.marcado{background-color:#C1FFC1 !important;}
.remover{ display:none;}
tbody{display: none;
}
@nailton
nailton / alternativeGetimagesize.php
Created May 24, 2014 01:05
Alternativa para getimagesize em ambientes windows.
<?php
function ranger($url){
$headers = array(
"Range: bytes=0-32768"
);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
var sum = 0;
$(".valor-simula-"+<?php echo $a; ?>).each(function() {
sum += Number(parseFloat($(this).val()));
$("#mostra-total-"+<?php echo $a; ?>).text(formatNumber(sum));
});
//formatar para formato brasileiro
function formatNumber(number)
{