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
const getFormattedDay = (stringDate) => {
const date = new Date(stringDate);
const options = {
weekday: 'short',
month: 'short',
day: 'numeric' ,
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
year: 'numeric',
@Onas182
Onas182 / Readme.md
Last active June 22, 2021 07:50
Location Customization (Change Language) in @coachcare/datepicker

Material DatePicker by CoachCare

Fork of the official Material Datepicker for Angular v6 with timepicker support.

The datepicker allows users to enter a date either through text input, or by choosing a date from the calendar.
It is made up of several components and directives that work together.

Further documentation can be found at the official docs: https://material.angular.io/components/datepicker/overview

@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" />
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 18, 2024 23:08
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@codesandtags
codesandtags / turismo.json
Last active April 16, 2017 16:16
Guia Turistica Colombia
{
"transportes": [
{
"name": "AS TRANSPORTES",
"phone": "57 (4) 448 60 48 Ext",
"address": "Cra 69 No 49 - 06",
"location": "Medellín",
"url": "www.astransportes.com.co"
},
{
// (c) 2017 Yami Odymel
// This code is licensed under MIT license.
package main
import (
"fmt"
"html"
"strconv"
)
@wojteklu
wojteklu / clean_code.md
Last active May 19, 2024 03:34
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@lalkmim
lalkmim / codility_solutions.txt
Last active April 25, 2024 21:47
Codility Solutions in JavaScript
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/
@telekosmos
telekosmos / uniq.js
Last active November 15, 2022 17:13
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;
});
@Miserlou
Miserlou / cities.json
Created April 30, 2015 06:58
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},