Skip to content

Instantly share code, notes, and snippets.

Juan Felipe Alvarez Saldarriaga nebiros

Block or report user

Report or block nebiros

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
View FullWidthSelfSizingCollectionView.swift
import UIKit
import Cartography //
This is an example of self sizing `UICollectionView` cells using AutoLayout,
where the width of cells is always the width of the parent, to mimic `UITableView`.
fileprivate let items: [String] = (0..<100)
.map { _ in Lorem.sentences(Int.random(min: 1, max: 8)) } // Using
laurenfazah /
Last active Feb 16, 2020
Authentication with an Express API and Postgres

Authentication with an Express API and Postgres

Setting Up

Let's make sure our Express app has the required base modules:

# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon
dorner / cron.yaml
Last active Apr 1, 2019
How to execute code in Elastic Beanstalk only if you're the leader
View cron.yaml
# We are not using this file to run actual cron jobs. This is because the
# built-in Elastic Beanstalk cron feature actually puts the jobs at the end
# of the SQS queue. Instead we will run them manually. However, we need to
# have a non-empty cron.yaml or the SQS daemon won't even run and leader
# election won't work.
version: 1
- name: "DoNothingJob"
url: "/periodic_tasks"
schedule: "0 0 31 2 *"
rsudip90 / nullHandle.go
Last active Jul 26, 2019
How I handled the null possible value in a sql database row in golang?
View nullHandle.go
package main
import (
abraithwaite / config.go
Created Mar 15, 2017
Awesome way to do configuration in go. Taken from
View config.go
package main
import (
jonfhancock /
Last active May 14, 2019
This set of classes demonstrates what a Not Dumb ViewHolder should look like. It lightens the load on the Adapter, and places decisions about what to do with user interactions on the Activity where it belongs.
public class ExcellentAdventure {
@StringDef({ERA_BC, ERA_AD})
public @interface Era {
public static final String ERA_BC = "BC";
public static final String ERA_AD = "AD";
TrevorJTClarke /
Last active Mar 9, 2017 — forked from RobertoSchneiders/
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

Configure the deploy of AWS Elastic Beanstalk through CircleCI.

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

    The aws user must have the right permissions. This can be hard, maybe, this can help you.

Confirm Build Environment:

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.Locale;
// Gist
// Relevant SO question
View UserDefaultable.swift
//: UserDefaultable.swift
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope,
import Foundation
// MARK: - Key Namespaceable
You can’t perform that action at this time.