Skip to content

Instantly share code, notes, and snippets.

View mauroreisvieira's full-sized avatar

Mauro Reis Vieira mauroreisvieira

View GitHub Profile
@mauroreisvieira
mauroreisvieira / console-wrap.json
Last active April 29, 2018 20:45
My entire Sublime Text Preferences & Settings
{
"js": {
"single_quotes": true,
"log_types" : [
"assert",
"clear",
"count",
"debug",
"dir",
"error",
@mauroreisvieira
mauroreisvieira / typescript-utils.ts
Last active November 10, 2024 17:59
Some basic utilities to help with your Typescript projects
export class Util {
private observer: MutationObserver;
constructor() {
/** CODE */
}
/**
* Save items in browser storage.
* @param {string} name
@mauroreisvieira
mauroreisvieira / gulpfile.js
Last active February 19, 2018 15:27
Gulp configs for web developer
const gulp = require('gulp');
const sass = require('gulp-sass');
const jshint = require('gulp-jshint');
const uglify = require('gulp-uglify');
const browserSync = require('browser-sync');
const sourcemaps = require('gulp-sourcemaps');
const autoprefixer = require('gulp-autoprefixer');
const reload = browserSync.reload;
const notify = require('gulp-notify'),
const plumber = require('gulp-plumber');
@mauroreisvieira
mauroreisvieira / HelloWeek.html
Last active May 8, 2018 22:07
Init Hello Week
<div class="hello-week">
<div class="hello-week__header">
<button class="demo-prev">Prev</button>
<div class="hello-week__label"></div>
<button class="demo-next">Next</button>
</div>
<div class="hello-week__week"></div>
<div class="hello-week__month"></div>
</div>
@mauroreisvieira
mauroreisvieira / _functions.scss
Last active March 19, 2018 20:08
Functions to use in SCSS
@function sqrt($r) {
$x0: 1;
$x1: $x0;
@for $i from 1 through 10 {
$x1: $x0 - ($x0 * $x0 - abs($r)) / (2 * $x0);
$x0: $x1;
}
@return $x1;
@mauroreisvieira
mauroreisvieira / sublime-exemple-project.json
Created March 16, 2018 12:43
Exemple of Project Settings in Sublime Text
{
"folders":
[
{
"path": "/Users/mauroreisvieira/Documents/FOLDER",
"folder_exclude_patterns":
[
".git",
"tests",
"node_modules"
@mauroreisvieira
mauroreisvieira / sublime-keymap.json
Created March 16, 2018 12:44
Sublime Text my configurations for keymap
[
{ "keys": ["alt+shift+f"], "command": "toggle_distraction_free" },
{ "keys": ["command+alt+up"], "command": "fold" },
{ "keys": ["command+alt+down"], "command": "unfold" },
{ "keys": ["command+shift+r"], "command": "goto_symbol_in_project" },
{ "keys": ["command+i"], "command": "reindent", "args": { "single_line": false } },
{ "keys": ["command+shift+a"], "command": "align_tab", "args" : {"live_preview" : true} },
{
"keys": ["command+t"],
"command": "open_terminal",
@mauroreisvieira
mauroreisvieira / sublime-settings.json
Last active September 24, 2019 16:15
My settings in Sublime Text
{
"close_windows_when_empty": true,
"color_scheme": "Packages/Meetio/schemes/Meetio-Lighter.sublime-color-scheme",
"ensure_newline_at_eof_on_save": true,
"font_face": "Fira Code",
"font_options":
[
"gray_antialias",
"subpixel_antialias"
],
@mauroreisvieira
mauroreisvieira / _mixins.scss
Last active March 19, 2018 20:09
Mixin to use in SCSS
@mixin mobile($max-w : $mobile) {
@media (max-width: $max-w) {
@content;
}
}
@mixin tablet($max-w : $tablet) {
@media (max-width: $max-w) {
@content;
@mauroreisvieira
mauroreisvieira / webpack.config.js
Last active March 16, 2018 12:48
Webpack configurations for SCSS and Typescript
const webpack = require('webpack');
const path = require('path');
const extractTextPlugin = require('extract-text-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry : {
[NAME_SAVED_FILE]: './src/scripts/[NAME_FILE].ts'
},
output: {