Skip to content

Instantly share code, notes, and snippets.

View paulomcnally's full-sized avatar
:octocat:
JS

Paulo McNally paulomcnally

:octocat:
JS
View GitHub Profile
@paulomcnally
paulomcnally / table_count_by_schema_pg.sql
Created August 16, 2018 21:07
Contador de tablas por esquema en PostgreSQL
SELECT
count(*) AS "tables", schemaname
FROM
pg_tables
WHERE
schemaname
IN
(
SELECT
nspname
@paulomcnally
paulomcnally / gist:89e57ae944b40915ff52b022c9c8dda4
Created July 11, 2018 19:27
Clean cache on public directory from rails projects
git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch public/assets' --prune-empty --tag-name-filter cat -- --all
git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch public/packs' --prune-empty --tag-name-filter cat -- --all

Netlify

  • 100 hours run time/month

Heroku

  • Las cuentas tienen una base de 550 horas por mes en las que se pueden ejecutar sus dynos gratuitos. Además de estas horas base, las cuentas que verifican con una tarjeta de crédito recibirán 450 horas adicionales para la cuota mensual libre de dyno.
@paulomcnally
paulomcnally / gist:3c8b815347ac902f6bc4a7f158c85ff6
Created May 7, 2018 17:43
Visual Studio Code Keyboard Shortcuts
command + p = Find file

09/04/2018

$ npm info "eslint-config-airbnb@latest" peerDependencies

Output:

{
  eslint: '^4.9.0',
  'eslint-plugin-import': '^2.7.0',

'eslint-plugin-jsx-a11y': '^6.0.2',

{
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
@paulomcnally
paulomcnally / Button.js
Last active April 4, 2018 22:00
Require prop-types module.
import React, { Component } from 'react';
import { StyleSheet, View, Text, TouchableHighlight } from 'react-native';
import PropTypes from 'prop-types';
/**
* Color of underlayColor based themes
*/
const underlayColors = {
primary: '#0062cc',
secondary: '#545b62',
#! /bin/bash
# get branch name
branch=$(git rev-parse --abbrev-ref HEAD)
# validate branch (test)
if [ "$branch" == "test" ]; then
echo ""
echo "Preparando la precompilación"
echo ""
import HeaderButtons from 'react-navigation-header-buttons';
import Icon from 'react-native-vector-icons/Ionicons';
static navigationOptions = {
title: 'Usage With Icons',
headerRight: (
<HeaderButtons IconComponent={Ionicons} iconSize={23} color="blue">
<HeaderButtons.Item title="add" iconName="ios-search" onPress={() => console.warn('add')} />
<HeaderButtons.Item title="select" onPress={() => console.warn('edit')} />
</HeaderButtons>