Skip to content

Instantly share code, notes, and snippets.

View wilcorrea's full-sized avatar
🚀
// TODO: be life good

William Correa wilcorrea

🚀
// TODO: be life good
View GitHub Profile
@wilcorrea
wilcorrea / rc4.js
Created July 10, 2014 22:17 — forked from farhadi/rc4.js
/*
* RC4 symmetric cipher encryption/decryption
*
* @license Public Domain
* @param string key - secret key for encryption/decryption
* @param string str - string to be encrypted/decrypted
* @return string
*/
function rc4(key, str) {
var s = [], j = 0, x, res = '';
<?php
define('HOST', 'www.site.com.br');
$hostname = 'imap.' . HOST;
$username = 'catch@' . HOST;
$password = '**************';
$options = array("port" => 143, "settings" => array("notls"), "tagged" => "INBOX");
$imap = new Imap($hostname, $username, $password, $options);
@wilcorrea
wilcorrea / likeit.php
Last active September 24, 2015 23:44
<?php
$supino = array(
'm' => array(
'a'=>array(
'Superior'=>(object)['min'=>1.34, 'max'=>5]
, 'Excelente'=>(object)['min'=>1.2, 'max'=>1.33]
, 'Boa'=>(object)['min'=>1.07, 'max'=>1.19]
, 'Média'=>(object)['min'=>0.9, 'max'=>1.6]
, 'Fraca'=>(object)['min'=>0, 'max'=>0.89]
@wilcorrea
wilcorrea / index.html
Created August 9, 2016 20:15 — forked from k33g/index.html
Vue.js + ES6
<div id="demo">
<h1>{{bob.fields.firstName}} {{bob.fields.lastName}}</h1>
</div>
<ul id="humans-list">
<li v-repeat="humans">
{{fields.firstName}} {{fields.lastName}}
</li>
</ul>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.1.2/css/bulma.min.css"
integrity="sha256-8TT9mHOU3psGaXjyZO82K8wm1ZwLUwWhN5zeZOxJ1Qs=" crossorigin="anonymous" />
</head>
<body>
<div class="container">
<h1 class="title is-2">Placar da Rodada</h1>
@wilcorrea
wilcorrea / README.md
Created September 26, 2016 19:53 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

<script>
import UseModal from './shared/modal/UseModalMixin.js';
export default {
mixins: [UseModal],
};
</script>
<template>
<modal size="md" v-ref:modal>
@wilcorrea
wilcorrea / fancy-tabs-demo.html
Created October 5, 2016 01:44 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
@wilcorrea
wilcorrea / index.php
Last active October 5, 2016 22:04
receive use cors
<?php
header("Access-Control-Allow-Origin: *");
$output = [
'input' => null,
'post' => null,
'get' => null,
];