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 / 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 / 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 / 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 / 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 / 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 / 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 / products.json
Last active November 20, 2016 15:25
JSON to fake a product service in ng2
[{
"productId": 1,
"productName": "Leaf Rake",
"productCode": "GDN-0011",
"releaseDate": "March 19, 2016",
"description": "Leaf rake with 48-inch wooden handle.",
"price": 19.95,
"starRating": 3.2,
"imageUrl": "http://openclipart.org/image/300px/svg_to_png/26215/Anonymous_Leaf_Rake.png"
},
@jorgeas80
jorgeas80 / .gitignore
Created November 25, 2016 13:34 — forked from fafaradesigns/.gitignore
WebDev:Gitignore File
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.sass-cache*
@jorgeas80
jorgeas80 / ts_quick_workshop.md
Created November 28, 2016 08:47
TypeScript quick workshop

Basic Types

Classic ones

Boolean

let isDone: boolean = false;

Number

@jorgeas80
jorgeas80 / command_line_hacks.md
Last active November 28, 2016 08:56
Command line hacks

Case insensitive and recursive grep

grep -irn whatever *

Replace string in all files

find . -type f -exec sed -i 's/original_string/replacement/g' {} +