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 / Caddyfile
Last active June 24, 2017 22:18
Feathers.js + Docker + Caddy | SSL + HTTP2
your.domain.com {
proxy / web:3030 {
proxy_header Host {host}
proxy_header X-Real-IP {remote}
proxy_header X-Forwarded-Proto {scheme}
websocket
}
tls youremail@gmail.com
}
@lopezjurip
lopezjurip / README.md
Last active April 5, 2017 08:23
Ionic2 publish Android app | sign .apk step

Go to the output .apk directory:

cd /Users/patriciolopez/Repositories/almapp/uc-courses-mobile/platforms/android/build/outputs/apk/

Put your release.keystore in that folder, if you don't have one (change ALIAS):

keytool -genkey -v -keystore release.keystore -alias ALIAS -keyalg RSA -keysize 2048 -validity 10000
// src/index.ts
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
interface Props {
import requests
url = 'https://chile.rutificador.com/'
client = requests.session()
client.get(url)
csrftoken = client.cookies['csrftoken']
url = url + 'get_generic_ajax/'
@lopezjurip
lopezjurip / 00000000000000_enable_uuid.rb
Created July 19, 2016 17:28
Rails 5 w/ Postgres: Use UUID instead of a numeric ID as primary keys
# db/migrate/00000000000000_enable_uuid.rb
class EnableUuid < ActiveRecord::Migration[5.0]
def change
execute 'create extension "uuid-ossp"'
enable_extension 'uuid-ossp'
end
end
@lopezjurip
lopezjurip / index.js
Last active December 17, 2016 15:43
Detect semver release
const assert = require('assert');
function version(semver) {
const indexes = [
'major',
'minor',
'patch',
];
return semver.split('.').reduce((classification, number, index) => {
'use strict';
const _ = require('lodash');
const moment = require('moment');
const now = moment().hour(11).minute(30).second(0);
function group(number, name) {
return { number, name };
}
@lopezjurip
lopezjurip / docker-compose.yml
Created June 20, 2016 04:04
HAProxy: expose containers with subdomains
webclient:
environment:
- NODE_ENV=production
- VIRTUAL_HOST=myapp.com
build: 'webclient' # this directory must have a Dockerfile
links:
- mongo
restart: always
lb:
@lopezjurip
lopezjurip / README.md
Last active October 7, 2016 11:46
PintosOS with Docker (useful macOS)

Make sure you have Docker up and running.

docker run --name=pintos -v /$(pwd):/home/OS -t -i ubuntu:16.04 /bin/bash

Inside the container run:

cd /home/OS
// src/components/NotFound/index.js
import React, { PropTypes, Component } from 'react';
import classnames from 'classnames';
import './style.css';
export default class NotFound extends Component {
// static propTypes = {}
// static defaultProps = {}
// state = {}