Skip to content

Instantly share code, notes, and snippets.

🕶
snorting lines of code in Miami

Danilo Alonso damusix

🕶
snorting lines of code in Miami
Block or report user

Report or block damusix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@damusix
damusix / setup.sh
Created Jul 3, 2019
Setup new macbook
View setup.sh
#!/bin/bash
# xcode
xcode-select --install
# brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
exec bash
@damusix
damusix / index.html
Last active May 3, 2019
Riot 4 webpack config. Babel polyfill for axios support.
View index.html
<html>
<head>
<meta charset="UTF-8">
<title>Riot 4!!!</title>
</head>
<body>
<noscript>
<h1>This site is a simple single page app that requires javascript.</h1>
</noscript>
@damusix
damusix / no-stream-meiosis.js
Last active May 2, 2019
No-stream implementation of meiosis pattern http://meiosis.js.org
View no-stream-meiosis.js
const store = {
// Initial state
state: {
working: true,
items: [],
},
actions: (update) => ({
getThings: () => {
@damusix
damusix / browser-stream-meiosis.js
Last active May 2, 2019
Very inefficient and redundant implementation of meiosis pattern using browser's `ReadableStream` http://meiosis.js.org
View browser-stream-meiosis.js
const noop = () => {};
const store = {
// Initial state
state: {
working: true,
items: [],
},
actions: (update) => ({
@damusix
damusix / export-env.zsh
Last active May 2, 2019
Automatically export variables in a .env file
View export-env.zsh
# Manually set env
setenv() {
[[ -f .env ]] \
&& echo "Exporting variables in '.env'..." \
&& export $(cat .env | grep -v '^\#' | xargs);
}
# Automatically source .env files on new zsh session
setenv;
@damusix
damusix / keybase.md
Last active May 3, 2019
Contact me on keybase!
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@damusix
damusix / app.js
Last active Dec 6, 2018
RiotJS Global Store
View app.js
// Originally, I was using Redux to contain the state, but switched to RiotControl
// because of its simplicity, and how it makes use of Riot's observable API.
// An issue I found with RiotControl was that, when you register multiple
// stores, it will call 1 event 1 time per store. So if you have 6 stores,
// `RiotControl.trigger('my-event')` will run 6 times. This is incredibly
// inefficient, especially if your app is doing a lot at once.
// After careful consideration, I failed to see the benefit of using
// RiotControl and instead opted for using the native Riot observable API.
@damusix
damusix / aws_iam_secret_to_smtp_password.md
Last active May 18, 2019
Convert AWS IAM credentials to AWS SMTP credentials
View aws_iam_secret_to_smtp_password.md

Convert AWS IAM credentials to AWS SMTP credentials

If you do, or want to, use AWS to deploy your apps, you will end up using AWS SES via SMTP when you're launching an app that sends out emails of any kind (user registrations, email notifications, etc). For example, I have used this configuration on various Ruby on Rails apps, however, it is just basic SMTP configurations and crosses over to any framework that supports SMTP sendmail.

There are two ways to go about this:

Luckily, you found this MD file and the NOT SO EASY WAY is suddenly copy-pasta... sudo yum....

You can’t perform that action at this time.