Skip to content

Instantly share code, notes, and snippets.

View omarkdev's full-sized avatar

Marcos Felipe omarkdev

View GitHub Profile
@omarkdev
omarkdev / enc-dec-example.php
Last active July 5, 2016 21:20
Encryption and Decryption in PHP
<?php
class mCode{
protected function enc($string){
$output = false;
$encrypt_method = "AES-256-CBC";
$secret_key = 'secret-key-1';
$secret_iv = 'secret-key-2';
$key = hash('sha256', $secret_key);
$iv = substr(hash('sha256', $secret_iv), 0, 16);
$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
@omarkdev
omarkdev / app.js
Last active July 5, 2016 21:19
Prototype JS para PHP Developers
//Instanciando uma função
var Music = function(){
}
var Song = new Music();
//Construtores
var Music = function(singer){
this.singer = singer;
@omarkdev
omarkdev / wSocialCode.svg
Created July 14, 2016 02:22
SVG Code for logo wSocialCode
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@omarkdev
omarkdev / curl-gugu-test.php
Created October 1, 2016 00:13
curl gugu testing
<?php
$words = [
'hue',
'test',
'fuck',
'dilm',
'fora',
'teme',
'pika',
'loko',
@omarkdev
omarkdev / MenuComposer.php
Created October 19, 2016 17:57
menu-composer
<?php
namespace App\Http\ViewComposers\Admin;
use Illuminate\View\View;
use Route;
class MenuComposer{
protected $routesPrefix = 'admin.';
protected $routesApi = ['destroy', 'create', 'store', 'show', 'update', 'edit'];
protected $routesMain = [
'welcome',
$(".selectFreq").on('change', function(){
alert('ok');
var soma = 0;
$(".servicos").each(function(x){
var val = $(this).val();
if(!val || isNaN(val))
return false;
soma = soma+parseFloat(val);
$app.config(['$routeProvider', function($routeProvider){
	$routeProvider.when('/', {
		templateUrl : "/views/welcome.html",
		name: "Início",
		controller: "WelcomeController"
	})
	.when("/talkers", {
		templateUrl : "/views/talkers.html",
 name: "Palestrantes"
@omarkdev
omarkdev / e
Created November 26, 2016 03:58
2
6
16
36
80
176
382
@omarkdev
omarkdev / app.css
Created December 1, 2016 13:12
Input not clickable with css and jQuery
.inpt-no-clickable {
pointer-events: none;
}
@omarkdev
omarkdev / cpf_consulta_api_sus.py
Created December 5, 2016 08:49 — forked from jh00nbr/cpf_consulta_api_sus.py
Script simples para consulta de dados na base dados nacional do SUS utilizando o CPF.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests,json,sys
# Script simples para consulta de dados na base dados nacional do SUS utilizando o CPF.
# Jhonathan Davi A.K.A jh00nbr / Insightl4b lab.insightsecurity.com.br
# Blog: lab.insightsecurity.com.br
# Github: github.com/jh00nbr
# Twitter @jh00nbr