Skip to content

Instantly share code, notes, and snippets.

Avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile
@Couto
Couto / Dockerfile
Last active Oct 26, 2021
Install SphereServer X using docker
View Dockerfile
FROM debian:buster-slim
WORKDIR /sphere
RUN apt-get update --fix-missing \
&& apt-get install -y \
curl \
mysql-common \
&& apt-get clean;
@Couto
Couto / readme.md
Created Mar 23, 2020
Storybook Typescript Path alias example
View elm-lookalike.js
const curry = fn =>
function cf(...args) {
return args.length >= fn.length
? fn(...args)
: (...newArgs) => cf(...[...args, ...newArgs]);
};
const element = curry((element, attributes, children) => {
const el = Object.keys(attributes).reduce(
(el, attribute) => el.setAttribute(attribute, attributes[attribute]),
@Couto
Couto / changelog.sh
Last active Mar 7, 2019
Create a short changelog between two tags
View changelog.sh
git shortlog -e --format="%h %s" <last_tag>..HEAD | git tag -s <new_tag> -F -
```
First Name <email@example.com> (5):
f2b7c5c Add support for multiple environments (#3)
ac202d9 Configure read_only mode (#5)
024d580 Convert `read_only_dashboard` to string (#6)
dcfa003 Add monitors submodule (#7)
fa92fc2 Fix metrics' properties (#8)
View apply-patch.sh
# Create the patch
git reset --hard origin/master
git format-patch -o /tmp -1 HEAD > /tmp/patch-name
# For each service
git checkout master
git pull --ff-only
git checkout -b "$(basename -s .patch $(cat /tmp/patch-name))"
git am -3 "$(cat /tmp/patch-name)"
View keybase.md

Keybase proof

I hereby claim:

  • I am Couto on github.
  • I am couto_yld (https://keybase.io/couto_yld) on keybase.
  • I have a public key whose fingerprint is DAD8 A82B 1EBA 55FE 0FD8 BB82 D64F 0C33 E970 FB79

To claim this, I am signing this object:

@Couto
Couto / terraform.rb
Last active Jan 18, 2019
terraform v0.10.8
View terraform.rb
require "language/go"
class Terraform < Formula
desc "Tool to build, change, and version infrastructure"
homepage "https://www.terraform.io/"
url "https://github.com/hashicorp/terraform/archive/v0.11.8.tar.gz"
sha256 "c0d7a0b726579574bcfee2ae141be4e82d1c9ab4a339cc6f86f9ec38de9130fb"
head "https://github.com/hashicorp/terraform.git"
bottle do
@Couto
Couto / main.js
Last active Jul 31, 2018
Demonstration of a bug in rollup-plugin-commonjs
View main.js
export default (a, b) => a + b;
@Couto
Couto / get.js
Created Jul 13, 2018
Lodash's .get() similar
View get.js
/**
*
* @param {any} defaultValue
* @param {String} propertyPath 'a.b.c.4'
* @param {any} obj | defaultValue
* @example getValue('foo', 'a.b.c.4', { a:{ b:{ c: [0, 1, 2, 3] } } }) // 3
*/
var getValue = exports.getValue = function (defaultValue, propertyPath, obj) {
var paths = propertyPath.split('.');
var currentObj = obj;
@Couto
Couto / .flowconfig
Last active Jun 23, 2018
Flow focus-check example
View .flowconfig
[ignore]
[include]
[libs]
[lints]
[options]