View hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
View gen-action-creators.js
actions = [
'SET_AUTH',
'SET_USUARIO',
'SET_CODIGO_RECUPERACAO',
'SET_PUBLICOS',
'SET_CURR_PUBLICO',
'SET_MENSAGENS',
'SET_CURR_MENSAGEM',
'ATIVAR_LOADING',
'DESATIVAR_LOADING',
View react-native-two-column-layout.jsx
<View style={{ justifyContent: 'center', alignItems: 'center', flexDirection: 'row', flex: 1}}>
<View>
<Text>Left</Text>
</View>
<View>
<Text>Right</Text>
</View>
</View>
View groovy-ubuntu.sh
#!/bin/bash
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install groovy
echo $(groovy -version)
View models-index.js
'use strict'
const fs = require('fs')
const path = require('path')
const Sequelize = require('sequelize')
const basename = path.basename(module.filename)
const config = require('../config')
const env = config.NODE_ENV
const envConfig = config[env] // environment specific configs
const _ = require('lodash')
View AxiosFactory.js
import axios from 'axios'
import jwtDecode from 'jwt-decode'
import { debounce } from 'lodash'
const verbose = process.env.NODE_ENV === 'development'
const log = (...args) => verbose && console.log(`${AxiosFactory.name}:`, ...args)
const warn = (...args) => verbose && console.warn(`${AxiosFactory.name}:`, ...args)
const critical = (...args) => verbose && console.error(`${AxiosFactory.name}:`, ...args)
const emptyFn = () => {}
View 20-nvidia-xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 390.48 (builduser@felix) Wed Apr 4 22:26:43 CST 2018
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
View pm2-routine-cron-builder.sh
#!/bin/sh
# RUN THIS FILE INSIDE YOUR PROJECT ROOT ON THE FINAL ENVIRONMENT HOST
PM2_ENVS=('development' 'staging' 'production')
ROUTINES_NAMES=('pm2-app-a', 'pm2-app-b')
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
PROJ_DIR="$SCRIPTPATH"
NODE_VERSION=$(cat ~/.nvm/alias/default)
NODE_NVM="~/.nvm/versions/node/v$NODE_VERSION"
View sequelize-models-index.js
'use strict'
const fs = require('fs')
const path = require('path')
const Sequelize = require('sequelize')
const basename = path.basename(module.filename)
const config = require(__dirname + '/../config')
const env = config.NODE_ENV
const envConfig = config[env] // environment specific configs
const _ = require('lodash')
View react-native-genymotion-arch.md

Executar React Native com emulador Genymotion

O React Native é um framework Node.js que permite a geração de apps nativos constrolados pelo motor de JavaScript do Android e iOS.

É o projeto por trás dos apps do Facebook, Instagram, AirBnB, Wallmart, Skype e [outros][react-native-showcase].

  • [instalar Android Studio + Android SDK][install-android-studio] (pode ser necessário instalar as Platform Tools no SDK manager e adicionar ao PATH do sistema, para que o adb fique disponivel para o debugger e o emulador)
  • garantir que é possível executar ADB do terminal (ADB incluso na variável de ambiente PATH)
  • [instalar Virtual Box][install-virtual-box] (para Genymotion)
  • [instalar Genymotion][install-genymotion]