Skip to content

Instantly share code, notes, and snippets.

View VhMuzini's full-sized avatar
🎯
Focusing

VhMuzini VhMuzini

🎯
Focusing
  • Brasil
View GitHub Profile
@VhMuzini
VhMuzini / index.txt
Created July 11, 2020 19:03
Flutter References
// Flutter doc recomenda usar aspas simples ao inves de duplas
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#prefer-single-quotes-for-strings
@VhMuzini
VhMuzini / index.txt
Created June 26, 2020 19:05
Angular Worthy Discussions links
// Unsubscribing from observables that are not required anymore
https://stackoverflow.com/questions/38008334/angular-rxjs-when-should-i-unsubscribe-from-subscription/41177163#41177163
@VhMuzini
VhMuzini / date.ts
Created June 24, 2019 19:22
Utility date tools
import { isDate } from 'moment';
export class DateTools {
static getToday() {
return new Date();
}
@VhMuzini
VhMuzini / chart.ts
Created February 14, 2019 20:51
Chart Annotation Sample
import 'chartjs-plugin-annotation';
static chartOptions() {
const options: any = {
responsive: true,
title: {
display: true,
text: ''
},
scales: {
@VhMuzini
VhMuzini / gist:eae2c8b4324b368c1308dcf66ed4d3b4
Created February 1, 2019 13:20
Google Maps Icons Links
// ------------- SOURCE ----------
http://econym.org.uk/gmap/geicons.htm
// --------------------------------
http://maps.gstatic.com/mapfiles/markers2/drag_cross_67_16.png
http://maps.gstatic.com/mapfiles/markers2/measle.png
http://maps.gstatic.com/mapfiles/markers2/measle_blue.png
@VhMuzini
VhMuzini / main.ts
Created July 19, 2018 19:31
Ng2-chart Bar Configuration
//Need to pass array of colors for each data to avoid grey
chartColors = [
{
backgroundColor: ['#007bff', '#007bff', '#007bff', '#007bff', '#007bff',
'#007bff', '#007bff', '#007bff', '#007bff', '#007bff',
'#007bff', '#007bff', '#007bff', '#007bff', '#007bff',
'#007bff', '#007bff', '#007bff', '#007bff', '#007bff',
'#007bff', '#007bff', '#007bff'],
@VhMuzini
VhMuzini / component.html
Created June 7, 2018 17:48
Implement FITBOUNDS to AGM-MAP
<agm-map #agmmap
[latitude]="lat"
[longitude]="lng"
[maxZoom]="25"
[zoom]="3"
[zoomControl]="true"
[fitBounds]="bounds"
[mapTypeId]="'roadmap'"
[mapTypeControl]="true"
[fullscreenControl]="true"
@VhMuzini
VhMuzini / night-mode.txt
Created May 24, 2018 19:08
Google map Night-mode Style
styles: [
{elementType: 'geometry', stylers: [{color: '#242f3e'}]},
{elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
{elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
{
featureType: 'administrative.locality',
elementType: 'labels.text.fill',
stylers: [{color: '#d59563'}]
},
{
@VhMuzini
VhMuzini / maps.component.ts
Created May 24, 2018 18:44
google map typeControl
let mapOptions = {
center : new google.maps.LatLng(this.device.lat, this.device.lng),
zoom : this.mapDefaultsZoom,
// maxZoom: 15,
mapTypeId: google.maps.MapTypeId.HYBRID,
mapTypeControl: true,
mapTypeControlOptions:
{
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, // Possible Values: DEFAULT, DROPDOWN_MENU and HORIZONTAL_BAR
},
@VhMuzini
VhMuzini / index.html
Created May 8, 2018 13:56
Set style in angular2
<div class="home-component"
[style.width.px]="width"
[style.height.px]="height">Some stuff in this div
</div>
<div [style.height.%]="height">Some stuff in this div</div>