Skip to content

Instantly share code, notes, and snippets.

View nicholasess's full-sized avatar
🎯
Focusing

Nicholas Eduardo nicholasess

🎯
Focusing
View GitHub Profile
@nicholasess
nicholasess / gist:317d3e3cb70c2171606f
Created July 2, 2015 18:37
get images 50x50 and 200x200 facebook graph api
$scope.me = function(data) {
Facebook.api('/me?fields=id,first_name,last_name,email, picture', function(response) {
Facebook.api(response.id+'/picture?width=200', function(response2){
});
});
};
exports.uploadCover = function(file, callback){
var link = file.path+file.name;
var fileBuffer = fs.readFileSync(link, "utf8");
// if(fs.existsSync(link)){
// var type = file.name.split('.')[1];
// var key = buildFile(type, 'track_cover');
// s3.putObject({
var db = require("seraph")({
server: "",
user: "",
pass: ""
});
var fn = function(){};
fn.prototype.createUser = function(user, cb){
db.save(user, function(err, node) {
<!DOCTYPE html>
<html ng-app="App">
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div ng-controller="Main">
<form ng-submit="register(user)">
@nicholasess
nicholasess / interceptor.js
Created August 10, 2015 00:15
Interceptor AngularJs
angular.module('App')
.factory('Authinterceptor',function(){
var inter = {};
inter
})
@nicholasess
nicholasess / ngRoute
Created October 8, 2015 22:00
ngRoute vs ui.router
dasdas
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="//angularjsbrasil.us11.list-manage.com/subscribe/post?u=57f8085881dbe62bec2d7e5ca&amp;id=ca4547e677" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
.run(function($rootScope, $window){
$rootScope.USUARIO = {
id: $window.localStorage.getItem('id')
};
})
@nicholasess
nicholasess / err.js
Created February 20, 2016 20:10
Error Angular when use phatom to render html
Error: [$injector:modulerr] Failed to instantiate module App due to: [$injector:nomod]
Module 'App' is not available! You either misspelled the module name or forgot to load it.
If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.0/$injector/nomod?p0=App
http://br.welearnit.com/angular/angular.js:1799:71
ensure@http://br.welearnit.com/angular/angular.js:1721:45
module@http://br.welearnit.com/angular/angular.js:1795:20
http://br.welearnit.com/angular/angular.js:4064:35
forEach@http://br.welearnit.com/angular/angular.js:335:24
loadModules@http://br.welearnit.com/angular/angular.js:4048:12
@nicholasess
nicholasess / README
Last active November 23, 2022 00:30
Desafio Angular
Criar uma aplicação com Angular 1.x, que se comunique com a API do github.
A estrutura tem que se basear no modelo MVC, no uso de rotas para acessar subniveis, exemplo:
Usuario
-> repositorios
-> perfil do repositório
-> organizações
Requisitos: