- Nodejs -> https://nodejs.org/en/
- Typescript -> https://www.typescriptlang.org/
- Express -> http://expressjs.com/pt-br/
- Angular -> https://angularjs.org/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Here's a non-jQuery version: | |
function toQueryString(obj) { | |
var parts = []; | |
for (var i in obj) { | |
if (obj.hasOwnProperty(i)) { | |
parts.push(encodeURIComponent(i) + "=" + encodeURIComponent(obj[i])); | |
} | |
} | |
return parts.join("&"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var randomText = { | |
items: [], | |
items_default: [ | |
[], | |
[ "A DK", "A Jobbik", "Az LMP", "Az MSZP", "A Momentum", "Gyurcsány Ferenc és pártja", "Vona Gábor és pártja", "Botka László és pártja", "A milliárdos Gyurcsány Ferenc és pártja", "A luxusban élő Botka László és pártja" ], | |
[ "nekik kellene csöndben maradniuk", "ők szégyellhetik magukat", "ők járatták le magukat hazugságaikkal", "nekik kellene önvizsgálatot tartaniuk", "nekik kellene magukba nézniük", "ők váltak teljesen hiteltelenné" ], | |
[ "hagyták tönkremenni az egészségügyet", "nem tiltakoztak a vizitdíj ellen", "keveredtek oligarchák hálójába", "kezdték ki a magyarok nemzeti identitását azzal, hogy az EU-hoz törleszkedtek", "sodródtak a terrortól rettegő Nyugat-Európához", "hagyták elértéktelenedni a nyugdíjakat" ], | |
[ "a korábbi választási ciklusokban", "2010 előtt", "Gyurcsány és a szocialisták kormányzása idején", "az MSZP kormányzása alatt", "a 2000-es évek második felében" ], | |
[ "a foglalko |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This gist is a fast reference to ES06 to whose already knows es05. | |
//I'm trying to use a different approach: first the example and after the explanation. | |
//Lesson 1: Template literals | |
console.log(`hello ${firstname}, | |
how are you?`); | |
//Template literals are string literals with support for interpolation(using ${variable}) and multiple lines. |
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
Declaring class properties or methods as static makes them accessible without needing an instantiation of the class. A property declared as static can not be accessed with an instantiated class object (though a static method can).
self - self from the root
parent - parent of the class
static - true self
for exact class, static
is more agile than self
, super useful for inheritance issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Element.prototype.classList for IE8/9, Safari. | |
* @author Kerem Güneş <[email protected]> | |
* @copyright Released under the MIT License <https://opensource.org/licenses/MIT> | |
* @version 1.2 | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList | |
*/ | |
;(function() { | |
// Helpers. | |
var trim = function(s) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* HTTP Status Codes | |
* Copyright (c) 2012, marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* Taken from: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* Visual Studio find regex: ^(\d{3}) ([^\r\n]+)\r\n | |
* Visual Studio replace regex: '$1': '$2', // | |
* Notes wrapped in parens moved manually | |
*/ |