Skip to content

Instantly share code, notes, and snippets.


Patricio López Juri lopezjurip

View GitHub Profile
lopezjurip / css.json
Created May 22, 2020
Flexbox snippet for VSCode. Setup this on the CSS lang so it is available in styled-components etc.
View css.json
"Setup basic flexbox styling": {
"prefix": "flex",
"body": [
"display: flex;",
"flex-direction: ${1:column};",
"justify-content: ${2:flex-start};",
"align-items: ${3:flex-start};",
View apollo-quick-client.js
import { ApolloClient } from "apollo-boost";
import { setContext } from "apollo-link-context";
import { InMemoryCache } from "apollo-cache-inmemory";
export default class APIClient {
constructor(context = {}, options = {}) {
this.context = context;
this.options = { fetchPolicy: "no-cache", ...options };
const authLink = setContext((_, context) => {
return {
lopezjurip /
Last active Feb 11, 2020
Write to NTFS on OSX Yosemite and El Capitan

OUTDATED, see comments below

Install Homebrew:

ruby -e "$(curl -fsSL"

Update Homebrew formulae:

brew update
View hi.js
console.log("Hello world!");
lopezjurip /
Created Sep 26, 2015
OSX Homebrew: docker-machine setup


Make sure you have installed Homebrew and (Homebrew-Cask)[].

# Install Homebrew
ruby -e "$(curl -fsSL"

# Install Homebrew-cask
brew install caskroom/cask/brew-cask
lopezjurip / Cpp.sublime-build
Last active Jun 11, 2018
Sublime Text 3 - C++ Compile and run (OSX)
View Cpp.sublime-build
"cmd": ["g++ $file -o $file_base_name -I/usr/local/include ; ./$file_base_name"],
"selector": "source.c++",
"shell": true
lopezjurip /
Created Oct 21, 2015
GitPython clone with depth
import git
def clone(cls, directory, url, depth=3):
return git.Repo.clone_from(url, directory, depth=depth)
lopezjurip / App.js
Last active Mar 22, 2018
styled-components ssr problems with bad usage
View App.js
/* 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 /
Created Jan 10, 2018
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 /
Created Dec 16, 2016
macOS: Yarn + nvm with globals (bins) to $PATH

Yarn and nvm

  • Requisites: brew

Install nvm:

brew install nvm