Skip to content

Instantly share code, notes, and snippets.

View jhonnymoreira's full-sized avatar

Jhonny Moreira jhonnymoreira

View GitHub Profile

Vue Learning

Directives

Special attributes provided by Vue, which applies reactive behavior to the rendered DOM.

Each directive is prefixed with a v-. Here a list of all directives:

Conditional Directives

@jhonnymoreira
jhonnymoreira / dig.js
Last active May 12, 2017 19:25
An oneliner dig function for JavaScript.
/**
* @function
*
* Returns the value of a path to be found within an object.
*
* @param {Object} [from] The object to search
* @param {Array} [path] The path to search within object
*
* @return {*} The value from path search
*/
@jhonnymoreira
jhonnymoreira / XMLHttpRequest.js
Created April 20, 2017 14:22
A few JavaScript Patterns with opinionated code based on Stoyan Stefanov's book: JavaScript Patterns
const request = new XMLHttpRequest
const URL = 'https://google.com.br'
// `async` by default, since the last function param is ommited
request.open('GET', URL)
request.send()
// use `load` instead of `ready` so there is no need to do more checks
// related to status code and stuff
request.addEventListener('load', handleResponse)
" No compatibility with `vi`
set nocompatible
set encoding=utf-8
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
" Plugins and Bundles used
call vundle#begin()
@jhonnymoreira
jhonnymoreira / heu_fz_01
Created January 22, 2017 08:54
Hacker Evolution: Untold [DLC: Flight Zero] - Level: Intrusion
crack gate.wxt-airport.com 900
decrypt gate.wxt-airport.com
connect gate.wxt-airport.com 900
download backdoor_901.exploit
logout
exec backdoor_901.exploit gate.wxt-airport.com
connect gate.wxt-airport.com 901
@jhonnymoreira
jhonnymoreira / gulpfile.js
Last active December 19, 2016 22:40
Code to start and optimize a new project.
var gulp = require('gulp')
var plumber = require('gulp-plumber')
var eslint = require('gulp-eslint')
var pug = require('gulp-pug')
var stylus = require('gulp-stylus')
var cssnano = require('gulp-cssnano')
var uglify = require('gulp-uglify')
var autoprefixer = require('gulp-autoprefixer')
var imagemin = require('gulp-imagemin')
var browserSync = require('browser-sync').create()
@jhonnymoreira
jhonnymoreira / dotfiles.sh
Last active December 24, 2016 08:41
A study with Shell Script to rename and create dotfiles symlinks.
#!/bin/bash
blacklisted () {
blacklist=('LICENSE' 'README.md' 'dotfiles.sh')
for ((i = 0; i < ${#blacklist[@]}; i++))
do
if [ $1 == ${blacklist[$i]} ]
then
return 0
@jhonnymoreira
jhonnymoreira / gogh.sh
Created July 6, 2016 07:23
A custom Gogh Command Line to create profiles with theme's name.
#!/usr/bin/env bash
echo -e "
Gogh
\e[0;30m█████\\e[0m\e[0;31m█████\\e[0m\e[0;32m█████\\e[0m\e[0;33m█████\\e[0m\e[0;34m█████\\e[0m\e[0;35m█████\\e[0m\e[0;36m█████\\e[0m\e[0;37m█████\\e[0m"
echo -e "
Themes:
(\\e[0m\e[0;34m 01 \\e[0m\e[0m) aci
(\\e[0m\e[0;34m 02 \\e[0m\e[0m) aco
(\\e[0m\e[0;34m 03 \\e[0m\e[0m) azu
@jhonnymoreira
jhonnymoreira / binds_help.cfg
Last active January 19, 2018 23:47
All my configuration for CS:GO.
echo "====================================================="
echo "= BINDS HELP ="
echo "====================================================="
echo "= F1 = Kevlar + Helmet ="
echo "= F2 = (CZ-75/Tec-9/5-7) + Kevlar + Helmet ="
echo "= F3 = Smoke + Flash ="
echo "= F4 = Smoke ="
echo "= F5 = Flash ="
echo "= F6 = Defuser ="
echo "====================================================="