Skip to content

Instantly share code, notes, and snippets.

View dferrandizmont's full-sized avatar
🏠
Working from home

Daniel Mont Ferrandiz dferrandizmont

🏠
Working from home
  • Terrassa, Barcelona.
  • 23:41 (UTC +02:00)
View GitHub Profile
@dferrandizmont
dferrandizmont / ionic3cheatsheet.md
Created December 16, 2018 10:38
[Ionic 3 cheatsheet] #ionic

Ionic 3 cheat sheet by Benjamin

Les commandes principales:

  • npm install -g cordova ionic #Installer Ionic
  • $ ionic info #Récupérer toutes les info
  • $ ionic start blank #Créer un projet vierge
  • $ ionic start "myApp" #Multiple choix de création de projet
  • $ ionic generate #Creation divers
  • $ ionic generate component
@dferrandizmont
dferrandizmont / css-selector.md
Created December 16, 2018 10:43
[CSS selector] #css

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@dferrandizmont
dferrandizmont / java-8-cheatsheet.md
Last active December 17, 2018 14:38
[Java 8] Java 8 cheatsheet #java

JAVA 8 - Chuleta

Expresión Lambda

(int a) -> a * 2; // Calcula el doble de a
a -> a * 2; // o simplemente sin tipo
(a, b) -> a + b; // Suma 2 parametros
@dferrandizmont
dferrandizmont / angular-cheat-reactive-forms.md
Last active December 17, 2018 14:38
[Angular reactive forms] #angular

Reactive Forms

A quick reference guide on how to setup.

How to setup

import ReactiveFormsModule

import { ReactiveFormsModule } from '@angular/forms';
@NgModule ({
@dferrandizmont
dferrandizmont / csscheatsheet.md
Created December 16, 2018 10:42
[CSS cheatsheet] #css

/* RGBA Color Specification */

background-color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.3);

/* Box Shadow Attributes // (Inset or No, Horiz. (px), Vert. (px), Blur Radius, Spread, Shadow Color) */

/* Box Shadow - Standard */ box-shadow: 0px 0px 5px 1px #444;

@dferrandizmont
dferrandizmont / firebase.md
Created December 16, 2018 10:41
[Firebase] #firebase
title prism_languages tags layout
Firebase
coffeescript
WIP
2017/sheet

Authenticating

@dferrandizmont
dferrandizmont / firebasedatabase.md
Created December 16, 2018 10:40
[Firebase database api] #firebase
There is no way to store an empty object/array/null value.
There are also no actual arrays.  Array values get stored as objects with integer keys.
    (If all keys are integers, it will be returned as an array.)

Basically, it's one giant tree of hashes with string keys.
Simply write a value to any location, and the intermediary locations will automatically come into existance.

── Classes ──

DataSnapshot : Container for a subtree of data at a particular location.

@dferrandizmont
dferrandizmont / bashcheatsheet.md
Created December 16, 2018 10:39
[Bash cheatsheet] #bash

man COMMAND # Look up help for the given command

pwd # Print working directory cd MYDIR # Change directory to MYDIR cd ~/ # Change directory to user root (/Users/USERNAME) cd .. # Change directory up a level mkdir NEWDIR # Create a new directory in the current folder called NEWDIR

cp FROM_FILE TO_FOLDER # Copy FROM_FILE into TO_FOLDER cp -r FROM_DIR TO_FOLDER # Copy FROM_DIR into TO_FOLDER

@dferrandizmont
dferrandizmont / services.md
Last active December 17, 2018 14:39
[Services] #angular

Services

Use service for any Class that is to be mapped into the dependency injector.

Do not use a service for a method (use a Class instead).

Services are implemented as a Class and should be PascalCase. Angular will instantiate once only and inject the same instance in all cases. The dependency is therefore camelCase since it is an instance and should not be new'd. For example:

angular.module(...).service('myService', MyService);
@dferrandizmont
dferrandizmont / controllers.md
Created December 16, 2018 10:37
[Controllers] #angular

Controllers

Use a controller to augment shared scope.

  • To decorate it with value that HTML partials may bind to.
  • To provide behaviour that HTML partials may invoke.

Do not use a controller:

  • To store application state (describe in the route instead).
  • To store persistent data (controllers and scope are dropped on every route change, use service instead).
  • To implement behaviour and business logic (defer to a service).