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
export DEVELOPER_DIR="/Applications/"
for f in "$@"
SRCNAME=$(echo $(basename "${f}"))
SRCPATH=$(echo $(dirname "${f}"))
IanColdwater / twittermute.txt
Last active Apr 8, 2020
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
View DictionaryDecoder.swift
import Foundation
class DictionaryDecoder {
init() { }
func decode<T: Decodable>(_ type: T.Type, from data: [String: Any]) throws -> T {
let decoder = _Decoder(codingPath: [], source: data)
return try T(from: decoder)
IanKeen / DictionaryEncoder.swift
Last active Mar 7, 2019
DictionaryEncoder for Encodable types
View DictionaryEncoder.swift
class DictionaryEncoder {
init() { }
func encode(_ value: Encodable) throws -> [String: Any] {
let encoder = _Encoder(codingPath: [])
try value.encode(to: encoder)
guard let result = encoder.value as? [String: Any] else {
throw EncodingError.invalidValue(encoder.value as Any, .init(codingPath: [], debugDescription: "Invalid root container"))
nathantannar4 / Reflectable.swift
Created Dec 17, 2018
Generate JSON representation of values using the Mirror API
View Reflectable.swift
// Reflectable.swift
// Created by Nathan Tannar on 2018-12-04.
import Foundation
// Add this protocol to your `struct` or `class`
protocol Reflectable {
View Layout.swift
import UIKit
typealias Constraint = (_ child: UIView, _ other: UIView) -> NSLayoutConstraint
func equal<Axis, Anchor>(_ keyPath: KeyPath<UIView, Anchor>, constant: CGFloat = 0, priority: UILayoutPriority = .required) -> [Constraint] where Anchor: NSLayoutAnchor<Axis> {
return equal(keyPath, keyPath, constant: constant, priority: priority)
func equal<Axis, Anchor>(_ keyPath: KeyPath<UIView, Anchor>, _ toAnchor: KeyPath<UIView, Anchor>, constant: CGFloat = 0, priority: UILayoutPriority = .required) -> [Constraint] where Anchor: NSLayoutAnchor<Axis> {
return [{ view, other in
gokselkoksal / Channel.swift
Last active Jun 1, 2018
Channel implementation
View Channel.swift
public class Channel<Value> {
private class Subscription {
weak var object: AnyObject?
private let notifyBlock: (Value) -> Void
private let queue: DispatchQueue
var isValid: Bool {
return object != nil
View goroutines.swift
import Foundation
enum Message<T> {
case value(T)
case finished
protocol Channel: IteratorProtocol {
func send(_ value: Message<Element>)
cichondev / AWS_Single_LetsEncrypt.yaml
Last active Nov 18, 2019 — forked from tony-gutierrez/AWS_Single_LetsEncrypt.yaml
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and Apache.
View AWS_Single_LetsEncrypt.yaml
# Dont forget to set the env variable "CERT_DOMAIN", and either fill in your email below or use an env variable for that too.
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
# @source
Type: AWS::EC2::SecurityGroupIngress
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
miguelmota /
Last active Jul 10, 2019
Golang Standard Project Layout

Forked from golang-standards/project-layout

Standard Go Project Layout

This is a basic layout for Go application projects. It represents the most common directory structure with a number of small enhancements along with several supporting directories common to any real world application.

Clone the repository, keep what you need and delete everything else!

You can’t perform that action at this time.