Skip to content

Instantly share code, notes, and snippets.

View omarkdev's full-sized avatar

Marcos Felipe omarkdev

View GitHub Profile
@omarkdev
omarkdev / cpf_consulta_api_sus.js
Created December 5, 2016 08:52 — forked from Pompeu/cpf_consulta_api_sus.js
cpf_consulta_api_sus.js
'use strict';
const http = require('http');
const cpf = process.argv[2];
const url = 'http://dabsistemas.saude.gov.br/sistemas/sadab/js/buscar_cpf_dbpessoa.json.php?cpf='
const consult = `${url}${cpf}`;
http.get(consult, res => {
import random
import requests,json,sys
class generator:
cpf = []
v1 = 0
v2 = 0
@staticmethod
def generateCpf(self):
for i in range(1, 10):
<?php
$curl = new \Curl\Curl();
$curl->get('https://irql.bipbop.com.br/', array(
'q' => 'SELECT FROM \'BIPBOPJS\'.\'CPFCNPJ\'',
'apiKey' => '6057b71263c21e4ada266c9d4d4da613',
'documento' => '453.674.018-05',
'nascimento' => '24/11/1997'
));
<?php
namespace App\Inquiries;
use PHPHtmlParser\Dom;
class Consult{
protected $defaultUrl = 'https://consultaca.com/';
protected $ca;
protected $url;
protected $dom;
@omarkdev
omarkdev / FreightPostOfficeService.php
Last active December 14, 2016 21:13
Calcular frete dos correios com Laravel
<?php
class FreightPostOfficeService {
/**
* Source zip code to calculate the freight
*
* @var
*/
public $sourceZipCode;
/**
<?php
namespace Smart\Traits\Models;
trait RoleTrait {
/**
* Roles existed in application
*
* @var
*/
protected $configRoles;
@omarkdev
omarkdev / vuejs-filter-camel-case-filter.js
Created December 16, 2016 14:52
VueJS filter camel case
/**
* Converts a string to camel case.
* Example: fucking_string => fuckingString
*
* @param {String} str the string to convert
* @return {String}
*/
Vue.filter('camelCase', function (str) {
return str.toLowerCase()
.replace( /[-_]+/g, ' ')
<?php
Validator::extend('cpf', function($attribute, $value, $params, $validator){
$cpf = $value;
$cpf = preg_replace('/[^0-9]/', '', $cpf);
$cpf = str_pad($cpf, 11, '0', STR_PAD_LEFT);
if (strlen($cpf) != 11)
return false;
$cpfsCheck = [
'00000000000',
'11111111111',
const quiz = new Vue({
el: "#quiz",
data() {
return {
product: {},
show: {},
choices: {
questions: [],
options: []
},
<?php
namespace ArtisanPlus\Repositories;
use Illuminate\Support\Facades\Schema;
use Carbon\Carbon;
class TableRepository {
/**
* Implements orderBy in query
*