Skip to content

Instantly share code, notes, and snippets.

View HenriqueLimas's full-sized avatar

Henrique Limas HenriqueLimas

View GitHub Profile
@HenriqueLimas
HenriqueLimas / factoryAndService.js
Last active August 29, 2015 14:05
Difference between Factory and Service
/* Difference between Factory and Service
*
* Nate: All services used in AngularJs(Service, Factory) are singleton,
* because was created to share app information.
*/
function obj() {
this.properties = 1;
this.properties2 = 1;
}
@HenriqueLimas
HenriqueLimas / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
@HenriqueLimas
HenriqueLimas / solving_problems
Last active August 29, 2015 14:14
Solving Problems
Don't Panic!
Understand Input
Understand Output
Understand the relationship - some examples
Consider a systematically how human resolve problems
Wright a pseudocode
- Simple and correct solution first
processor make 1 billion instruction por second = 1ns/instruction
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" />
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
@HenriqueLimas
HenriqueLimas / app.yaml
Last active August 29, 2015 14:17 — forked from darktable/app.yaml
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@HenriqueLimas
HenriqueLimas / class-js.js
Last active August 29, 2015 14:17
Inheritance in Javascript.
(function(window) {
window.ClassJS = {
extend: extend,
clone: clone
};
function extend(subClass, superClass) {
function F() {}
F.prototype = superClass.prototype;
subClass.prototype = new F();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.letter-spacing {
letter-spacing: 1.2em;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
* {
font-family: 'arial', 'Helvetica', 'sans-serif';
}
.classe {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
div {
background-color: grey;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
* {
margin: 20px;
font-family: Arial, Helvetica
}