Skip to content

Instantly share code, notes, and snippets.

View codesandtags's full-sized avatar
:octocat:
Learning mode...

Edwin Torres codesandtags

:octocat:
Learning mode...
View GitHub Profile
@codesandtags
codesandtags / uniq.js
Created June 5, 2018 15:19 — forked from telekosmos/uniq.js
Remove duplicates from js array (ES5/ES6)
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var uniqEs6 = (arrArg) => {
return arrArg.filter((elem, pos, arr) => {
return arr.indexOf(elem) == pos;
});
@codesandtags
codesandtags / README.md
Last active May 12, 2018 15:06
Docker Alpine + Nginx + Angular setup

Docker Alpine + Nginx + Angular setup

Information about the image

Instructions to setup the environment

  1. Download the image.
@codesandtags
codesandtags / live-templates-angular-jasmine.xml
Last active May 10, 2018 14:15
Live Templates for Angular Projects and Testing
<template name="jdes" value="describe('When $DESCRIBE_NAME$ is invoke', () =&gt; {&#10; it('should $SHOULD_NAME$', () =&gt; {&#10; $END$&#10; });&#10;});" description="Jasmine Describe" toReformat="false" toShortenFQNames="true">
<variable name="DESCRIBE_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="SHOULD_NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_SCRIPT" value="true" />
<option name="TypeScript" value="true" />
</context>
</template>
<template name="jit" value="it('should $SHOULD_NAME$', () =&gt; {&#10; $END$&#10;});" description="It case" toReformat="false" toShortenFQNames="true">
<variable name="SHOULD_NAME" expression="" defaultValue="" alwaysStopAt="true" />
@codesandtags
codesandtags / credit-card-format.js
Created April 11, 2018 01:59
Example to create a Credit Card Format
var trimmed = '123456789';
var numbers = [];
for (let i = 0; i < trimmed.length; i += 4) {
numbers.push(trimmed.substr(i, 4));
}
console.log(numbers.join('-'));
@codesandtags
codesandtags / base-style.css
Created February 25, 2018 18:52
This is base for reset the styles with css
*,
*::after,
*::before {
padding: 0;
margin: 0;
box-sizing: inherit;
}
html {
font-size: 70%;
@codesandtags
codesandtags / gist:3d1c576dd2150e385597bc9cceb3a097
Created February 8, 2018 02:11 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@codesandtags
codesandtags / fib.js
Created December 10, 2017 02:54
Fib Algorithms solution
function memoize(fn) {
const cache = {};
return function(...args) {
if (cache[args]) {
return cache[args];
}
const result = fn.apply(this, args);
cache[args] = result;
@codesandtags
codesandtags / meetup_firebase.json
Created November 13, 2017 19:50
Meetup Firebase Example
{
"-KUtzPmBlLRE-1V2g_2N" : {
"title" : "Tour hidden places in Bogota",
"description" : "This is a tour through the centre of Bogota, in which you will have the opportunity to visit places that not even bogotanos know exist",
"event": {
"country" : "Colombia",
"city" : "Bogota",
"address" : "Calle 34 # 7A",
"cost" : "0",
"guest" : "20_50",
#!/bin/bash
RED='\033[00;31m'
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
BLUE='\033[00;34m'
NORMAL=$(tput sgr0)
# Check if there are console or debugger statements
@codesandtags
codesandtags / fonts_error.xml
Created August 3, 2017 13:47
This is a partial solution for the issue with fonts in ie10
<outboundRules>
<rule name="Remove Server">
<match serverVariable="RESPONSE_SERVER" pattern=".+" />
<action type="Rewrite" />
</rule>
<rule name="Font Cache-Control">
<match serverVariable="RESPONSE_Cache_Control" pattern=".+" />
<conditions>
<add input="{REQUEST_URI}" pattern="\.(eot|otf|ttf|woff|woff2)$" />
</conditions>