Skip to content

Instantly share code, notes, and snippets.

View jorgeas80's full-sized avatar
🎯
Focusing

Jorge Arévalo jorgeas80

🎯
Focusing
View GitHub Profile
@jorgeas80
jorgeas80 / ng.location.test.html
Created November 11, 2016 09:40 — forked from siberex/ng.location.test.html
AngularJS location provider example
<!doctype html>
<html lang="en"
xmlns:ng="http://angularjs.org" id="ng-app" ng-app="awesomeApp"
ng-strict-di="">
<head>
<title>Location test</title>
<base href="/ng.location.test.html/">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
@jorgeas80
jorgeas80 / basic_sass_features.md
Created November 5, 2016 15:23 — forked from blackfalcon/basic_sass_features.md
Exercises in basic Sass features

Sass is a powerhouse language that is adding new features all the time. For this introduction we will go over the basics of the language and see how they all tie together. We will discuss nesting, parent selector definitions, variables, Sass math, @extends, and @mixins.

Code comments

Commenting your code is the number one awesome thing any developer can do. In CSS you can place comments in your code /* */, but this will appear in the actual CSS and sometimes you don't want or need all that stuff to be there.

In Sass comments are highly encouraged. Sass has what are called 'silent comments' using the // syntax. This will allow the developer to comment like crazy and none of this is exposed in the final CSS. An interesting feature is that Sass supports both types of comments.

Scss

@jorgeas80
jorgeas80 / index_viewport.html
Last active October 22, 2016 09:30
Dummy html to test viewport
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!--uncomment this. It has no effect in chrome device mode (part of dev tools). It doesn't contain initial-scale=1 on purpose -->
<!--meta name="viewport" content="width=device-width"-->
<style>
/* Taken from http://stackoverflow.com/a/16432702/593722 */
@jorgeas80
jorgeas80 / normalized.html
Created October 18, 2016 18:43 — forked from scottkellum/normalized.html
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
@jorgeas80
jorgeas80 / quiz.json
Created October 4, 2016 09:47
To be used with a code that needs json data
[
{
"id": "q1",
"text": "Property binding with [value]=\"foo\" or interpolation with {{foo}} results in",
"options": [
{
"id": "q1.a1",
"text": "One-way binding from the component to the view"
},
{
@jorgeas80
jorgeas80 / sentences.json
Last active November 30, 2016 20:58
For quick tests
{
"line": "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.",
"author": "Brian W. Kernighan"
},
{
"line": "Walking on water and developing software from a specification are easy if both are frozen.",
"author": "Edward V Berard"
},
{
"line": "It always takes longer than you expect, even when you take into account Hofstadter's Law.",
@jorgeas80
jorgeas80 / launch.json
Last active August 27, 2017 16:47
launch.json file for debugging angular-cli applications in vscode
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost, with sourcemaps",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200",
"sourceMaps": true,
"webRoot": "${workspaceRoot}",
@jorgeas80
jorgeas80 / typescript_miniworkshop.md
Last active October 2, 2016 23:22
Some interesting TypeScript features, regarding its use in Angular 2

var vs let vs const

The difference is scoping. var is scoped to the nearest function block and let is scoped to the nearest enclosing block (both are global if outside any block), which can be smaller than a function block.

function allyIlliterate() {
    //tuce is *not* visible out here

    for( let tuce = 0; tuce < 5; tuce++ ) {
 //tuce is only visible in here (and in the for() parentheses)
@jorgeas80
jorgeas80 / angularjs-providers-explained.md
Created October 2, 2016 14:14 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@jorgeas80
jorgeas80 / .gitignore_global
Last active September 17, 2016 08:25
Global ignore file for projects
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #