Skip to content

Instantly share code, notes, and snippets.

View reginaldojunior's full-sized avatar

Reginaldo Junior reginaldojunior

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method='post' action='https://www.moip.com.br/Process.do'> <input type='hidden' name='method' value='donation'/> <input type='hidden' name='donation_id' value='8232'/> <input type='hidden' name='type' value='2'/> <input type='image' name='submit' src='https://static.moip.com.br/imgs/buttons/bt_doar_c02_e04.png' alt='upload blog in server' border='0' /> </form>
</body>
</html>
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="mySmallModalLabel">Small modal</h4>
</div>
<div class="modal-body">
...
</div>
@reginaldojunior
reginaldojunior / run.php
Created January 20, 2016 15:57
Solução para a primeira etapa do desafio para Vaga de Programador PHP Junior na SexLog (https://www.sexlog.com/desafiosexlogphp)
#!/usr/bin/php
<?php
function isPrimo($n){
if($n<5 || $n%2==0 || $n%3==0)
return ($n==2 || $n==3);
$maxP = sqrt($n)+2;
for($p=5; $p < $maxP; $p += 6)
@reginaldojunior
reginaldojunior / angular.min.js
Last active February 6, 2016 13:06
Test AngularJS - index.html
/*
AngularJS v1.3.16
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function(T,V,s){'use strict';function F(b){return function(){var a=arguments[0],c;c="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.3.16/"+(b?b+"/":"")+a;for(a=1;a<arguments.length;a++){c=c+(1==a?"?":"&")+"p"+(a-1)+"=";var d=encodeURIComponent,e;e=arguments[a];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;c+=d(e)}return Error(c)}}function Sa(b){if(null==b||Ta(b))return!1;var a="length"in Object(b)&&b.length;
return b.nodeType===ma&&a?!0:O(b)||w(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d,e;if(b)if(E(b))for(d in b)"prototype"==d||"length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d)||a.call(c,b[d],d,b);else if(w(b)||Sa(b)){var f="object"!==typeof b;d=0;for(e=b.length;d<e;d++)(f||d in b)&&a.call(c,b[d],d,b)}else if(b.forEach&&b.forEach!==q)b.forEach(a,c,b);else for(d in b)b.hasOwnProperty(d)&&a.cal
@reginaldojunior
reginaldojunior / .htaccess
Created March 7, 2016 15:54
.htaccess opencart
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
@reginaldojunior
reginaldojunior / ACT_WEATHER.ino
Created April 9, 2016 00:42 — forked from acturcato/ACT_WEATHER.ino
Web Client to consume Weather Underground web service (RESTful and JSON formats). This sketch connects to a website (http://api.wunderground.com) using an Arduino + Ethernet shield and get data from site. Circuit: * Arduino MEGA 2560 R3 Board. * Ethernet shield attached to pins 10, 11, 12, 13. Created 07 Jan 2014 by Afonso C. Turcato. Arduino ID…
/*
Web Client to consume Weather Underground web service
This sketch connects to a website (http://api.wunderground.com)
using an Arduino Ethernet shield and get data from site.
Circuit:
* Arduino MEGA 2560 R3 Board
* Ethernet shield attached to pins 10, 11, 12, 13
@reginaldojunior
reginaldojunior / image.js
Last active April 19, 2016 13:29
get image
var express = require('express');
var router = express.Router();
var Product = require('../models/product').Product;
var common = require('../aux/common');
var url = require('url');
var http = require('http');
var sizeOf = require('image-size');
var score = 0;
var verifyProductById = function(req, res) {
function array_sort_bycolumn(&$array, $column, $dir = 'asc') {
$newarr = null;
$sortcol = array();
foreach ($array as $a) {
$sortcol[$a[$column]][] = $a;
};
ksort($sortcol);
foreach ($sortcol as $col) {
foreach ($col as $row)
ALTER TABLE `winners`.`usuarios`
ADD COLUMN `cep_origem` VARCHAR(45) NULL AFTER `layout_loja`,
ADD COLUMN `descricao` VARCHAR(45) NULL AFTER `cep_origem`,
ADD COLUMN `token_pagseguro` VARCHAR(45) NULL AFTER `descricao`,
ADD COLUMN `loja_active` VARCHAR(45) NULL AFTER `token_pagseguro`;
@reginaldojunior
reginaldojunior / teste.json
Created October 19, 2016 13:44
teste.json
{
"_id": ObjectId("58064ab8681a0dc83cec174a"),
"inspected": false,
"timestamp": 1476807352,
"created_by": "7613ae35af373af3476214b6ee5328f2",
"created": new Date(1476807352179),
"user_id": "639",
"special_price": 0,
"link": "http://www.agestante.com.br/index.php?route=product/product&product_id=1557",
"available": {