This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* using curl | |
*/ | |
$key = 'YOUR_KEY_HERE'; | |
$secret = 'YOUR_SECRET_HERE'; | |
$api_endpoint = 'https://api.twitter.com/1.1/users/show.json?screen_name=marcosfernandez'; // endpoint must support "Application-only authentication" | |
// request token | |
$basic_credentials = base64_encode($key.':'.$secret); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('OAUTH2_CLIENT_ID', ''); | |
define('OAUTH2_CLIENT_SECRET', ''); | |
$authorizeURL = 'https://github.com/login/oauth/authorize'; | |
$tokenURL = 'https://github.com/login/oauth/access_token'; | |
$apiURLBase = 'https://api.github.com/'; | |
session_start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if you have get error on webpack/uglify with this | |
router.beforeEach((to, from, next) => { | |
document.title = to.meta.title | |
next() | |
}) | |
# change with this | |
router.beforeEach(function(to, from, next){ | |
document.title = to.meta.title | |
next() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"level": 1, | |
"code": 1, | |
"name": "Aveiro" | |
}, | |
{ | |
"level": 2, | |
"code": 101, | |
"name": "Águeda" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Estrutura da tabela `pais` | |
-- | |
CREATE TABLE IF NOT EXISTS `pais` ( | |
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, | |
`paisNome` varchar(50) NOT NULL, | |
`paisName` varchar(50) NOT NULL, | |
PRIMARY KEY (`paisId`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../paper-progress/paper-progress.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#paper_progress { | |
left: 90px; | |
top: 90px; | |
position: absolute; |