Skip to content

Instantly share code, notes, and snippets.

View lopezjurip's full-sized avatar
🎯
Focusing

Patricio López Juri lopezjurip

🎯
Focusing
View GitHub Profile
@lopezjurip
lopezjurip / App.js
Last active March 22, 2018 18:48
styled-components ssr problems with bad usage
/* FOCUS IN THE PURPLE (COOL) <a /> component */
// GOOD ----------------------------------
const Container = styled("div")``;
const Link = styled("a")`
color: green;
`;
const LinkCool = styled(Link)`
color: purple;
`;
@lopezjurip
lopezjurip / lines.sh
Created January 10, 2018 21:12
Rails 5 - Create seed.rb file from production database in Heroku
# Download with Heroku CLI
heroku pg:backups:capture
heroku pg:backups:download
# Should create a dump file, let's name it 'latest.dump'
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d MY_APP_development latest.dump
# Install 'seed_dump' gem
bundle exec rake db:seed:dump EXCLUDE=encrypted_password,reset_password_token
@lopezjurip
lopezjurip / README.md
Created December 16, 2016 21:08
macOS: Yarn + nvm with globals (bins) to $PATH

Yarn and nvm

  • Requisites: brew

Install nvm:

brew install nvm
// src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import Routes from './routes';
import './index.css';
ReactDOM.render(
@lopezjurip
lopezjurip / routes.js
Last active October 19, 2017 18:48
Using create-react-app with React Router + Express.js
// src/routes.js
import React from 'react';
import { Router, Route } from 'react-router';
import App from './components/App';
import About from './components/About';
import NotFound from './components/NotFound';
const Routes = (props) => (
<Router {...props}>
@lopezjurip
lopezjurip / .gitignore
Last active September 27, 2017 21:47
Xilinx gitignore
#Gitignore for files generated by Xilinx ISE
*.log
*.svf
*.scr
*.cmd
*.bak
*.lso
*.elf
*.ace
@lopezjurip
lopezjurip / README.md
Created October 22, 2015 21:05
Stackedit.io - Justify

Settings -> Extensions -> UserCustom

userCustom.onReady = function() {
    $('head').append(`<style>p, pre, blockquote {
      text-align: justify;
    }
    blockquote p, li p {
      text-indent: 0
    }</style>`);
};
@lopezjurip
lopezjurip / README.md
Last active July 19, 2017 09:01
Ruby on Rails - Send (batch) emails using mailgun-ruby (HTTP, not SMTP)

Requisites:

  • Create a free account at https://www.mailgun.com/
  • Save your API Key as a environment variables: export MAILGUN_API_KEY=key-1111111111111111111111111

As example, I will use a model named Request.

// server/app.js
const express = require('express');
const morgan = require('morgan');
const path = require('path');
const app = express();
// Setup logger
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms'));
@lopezjurip
lopezjurip / ReactNative
Created December 1, 2015 01:56
Paper Web Avanzado
# React Native
> Nombre: **Patricio López Juri**
> Número alumno: **1263476J**
> Github: **[github.com/mrpatiwi](https://github.com/mrpatiwi)**
## Introducción
### Aplicaciones *cross-platform*