Skip to content

Instantly share code, notes, and snippets.

View krvajal's full-sized avatar
:electron:
What's happening?

Miguel Carvajal krvajal

:electron:
What's happening?
  • @wearesinch
  • Antwerpen, Belgium
View GitHub Profile
@krvajal
krvajal / Gemfile
Created June 26, 2020 22:20 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@krvajal
krvajal / imagemagick.bash
Created August 5, 2019 19:32 — forked from bensie/imagemagick.bash
ImageMagick Static Binaries for AWS Lambda
#!/usr/bin/env bash
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime which can be found at:
# https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
#
# As of May 21, 2019, this is:
# Amazon Linux AMI 2018.03.0 (ami-0756fbca465a59a30)
#
# You need to prepend PATH with the folder containing these binaries in your Lambda function
# to ensure these newer binaries are used.

Everything I Know About UI Routing

Ingredients

  1. Location
    1. pathname
    2. state
    3. search/query
    4. hash
  2. Path
animated.DialogOverlay = animated(DialogOverlay)
animated.DialogContent = animated(DialogContent)
function NewPostDialog({ date, show, onDismiss }) {
const rootRef = useRef(null)
const transitions = useTransition(show, null, {
from: { opacity: 0, y: -10, blur: 0 },
enter: { opacity: 1, y: 0, blur: 8 },
leave: { opacity: 0, y: -10, blur: 0 },
@krvajal
krvajal / IAMCredentials.json
Last active March 11, 2019 19:07 — forked from ServerlessBot/IAMCredentials.json
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
import React, {
cloneElement,
useState,
useEffect,
useRef,
HTMLAttributes,
ReactElement
} from "react";
////////////////////////////////////////////////////////////////////////////////
@krvajal
krvajal / prettier-branch.sh
Last active June 25, 2018 14:25 — forked from tlrobinson/prettier-branch.sh
Steps for merging an old branch into a newly prettier-ified codebase. Use at your own risk, verify everything was correctly merged.
# Assumes 3 sequential commits:
#
# 1. commit tagged "prettier-before" that added `prettier` depedency and `prettier` script your package.json
# 2. commit that actually ran `prettier` on your entire codebase for the first time
# 3. commit tagged "prettier-after" that fixes any minor issues caused by prettier (e.x. moving eslint-ignore or $FlowFixMe comments around), or just the next commit if there were none
#
# I recommend running these as individual commands, not as a script, in case of merge conflicts
# In the sweepbright app this commits have the following hashes
# $prettier-before 👉 352f43227d9ae5de0de92b48158d0f02feb7588c
# $prettier-after 👉 5330ac90e7adf6f0867228680686f6aaedd8b065
@krvajal
krvajal / index.html
Last active January 4, 2018 23:44 — forked from anonymous/index.html
Redux store implementation
<script src="https://fb.me/react-with-addons-15.1.0.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://fb.me/react-15.1.0.js"></script>
/*
problema de la entrevista que mencioné en el último podcast:
https://soundcloud.com/sin-humo/entrevistas-de-trabajo-y-111mil
la idea es crear la función 'deferred', que permita un comportamiento
similar a lo que serían promises de javascript.
el deferred puede 'resolverse' con un valor cualquiera, o con otro 'deferred'.
en el segundo caso, el próximo `then` debería "esperar" también a este.