Skip to content

Instantly share code, notes, and snippets.

View mauroreisvieira's full-sized avatar

Mauro Reis Vieira mauroreisvieira

View GitHub Profile
@mauroreisvieira
mauroreisvieira / vdom-finished.html
Created April 20, 2020 15:41 — forked from themarcba/vdom-finished.html
Vue.js-like Virtual DOM
<div id="app"></div>
<script>
// Create virtual node
function h(tag, props, children) {
// Return the virtual node
return {
tag,
props,
children,
}
@mauroreisvieira
mauroreisvieira / 1. v-dom.js
Created April 14, 2020 09:57 — forked from LucaColonnello/1. v-dom.js
Virtual DOM lite implementation
/** @jsx h */
// refs
// https://medium.com/@deathmood/how-to-write-your-own-virtual-dom-ee74acc13060
// https://medium.com/@deathmood/write-your-virtual-dom-2-props-events-a957608f5c76
// test: https://jsfiddle.net/Luca_Colonnello/Lzjy5a67/1/
// comparison:
// current - https://jsfiddle.net/Luca_Colonnello/5xebu97u/3/
// vidom - https://jsfiddle.net/Luca_Colonnello/dp9cwn37/2/
class TestListener(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
return ([
sublime.CompletionItem(
trigger="tmartin",
annotation="OverrideAudit Author",
completion="Terence Martin",
completion_format=sublime.COMPLETION_FORMAT_TEXT,
{
"variables": {
"colorAccent": "#4A7C8A",
"tabSelectedBorderSize": [
0,
0,
0,
2
],
"sidebarIconFolderColor": "var(colorAccent)",
@mauroreisvieira
mauroreisvieira / memory-game.js
Last active February 28, 2019 20:33
Hack Memory Game
/**
* HACK MEMROY GAME
*
* 1º - Open the Link: http://artycoder.mistycreates.com/memory-game/
* 2º - Open the Chrome Dev Tools
* 3º - Paste the this code
* 4º - Magic happens
*/
function playGame(duration) {
const time = setInterval(() => {
@mauroreisvieira
mauroreisvieira / Adaptive.sublime-theme
Created November 30, 2018 11:14 — forked from OdatNurd/Adaptive.sublime-theme
Patched Adaptive.sublime-theme for modifying the color of files in the sidebar based on their git status
[
// VCS badges
{
"class": "vcs_status_badge",
"parents": [{"class": "file_system_entry", "attributes": ["untracked"]}],
"layer0.texture": "Theme - Default/common/status_untracked.png",
"layer0.tint": "color(var(--yellowish) blend(rgb(255, 255, 255) 60%))",
"layer0.opacity": 1.0,
"content_margin": 6
},
@mauroreisvieira
mauroreisvieira / .zshrc
Last active November 5, 2018 12:04
zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/mauroreisvieira/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="powerline"
{
"accent_color": "$scheme_accent_color",
"gutter_background_color": "#f6f9fc",
"gutter_foreground_color": [
"specify",
"#91a2b0",
"#91a2b0",
]
}
@mauroreisvieira
mauroreisvieira / DA Theme.sublime-settings
Last active May 21, 2018 15:50
Settings DA UI Theme for Sublime
{
"accent_color": "#6772e4",
"skin":
{
"scheme_accent_color": "#00f",
"id": "elegant",
"settings":
{
"find_in_files_panel_padding":
[
extends:
- stylelint-config-standard
- stylelint-config-recommended-scss
ignoreFiles:
- node_modules/**/*
plugins:
- stylelint-scss
- stylelint-order
rules:
# Follow best practices