Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Cardona Rojas DanielCardonaRojas

View GitHub Profile
@DanielCardonaRojas
DanielCardonaRojas / git_log_format.awk
Last active Aug 5, 2020
git release notes #git #awk #release #notes
View git_log_format.awk
#! /usr/bin/awk -f
BEGIN {
FS="\][ ]*[-]*[ ]*"
}
/^\[.*\]/ {
sub(/\[/, "", $1)
if (NR == 1) {
previous_commit_tag = $1
commit_message = "\t- " $2
@DanielCardonaRojas
DanielCardonaRojas / XVimSetup.md
Created Jun 26, 2020
Xcode, iOS Dev, used snippets and commands
View XVimSetup.md
@DanielCardonaRojas
DanielCardonaRojas / iterable.dart
Created May 29, 2020
Function generators dart
View iterable.dart
import 'dart:async';
void main() {
var i = 20;
final fIterable = fibonacci(Fibonacci(0, 1));
fIterable.take(30).forEach((element) { print(element)});
print('fibonacci($i) = ${fibonacci(i)}');
View cache_first_repository.dart
import 'package:dartz/dartz.dart';
abstract class Synchronizable extends Identifiable {
SyncronizedMark get syncStatus;
}
enum SyncronizedMark { synchronized, needsCreation, needsUpdate, needsDeletion }
class CacheFirstRepository<Entity extends Synchronizable>
View flutter_architecture.xml
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2020-03-26T17:30:01.852Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" etag="CozRrVWAEnlTrnrs07UZ" version="12.9.2" type="onedrive"><diagram id="t3-sszkKWpxtp2ijUWK8" name="Page-1">7Vtbd9o4EP41nG0fyME3Lo8Bkm3Obrc5ZbvdPnEUW2AlwnJlESC/fke2jLEliDcJcQ7pS4LGkpG+mfnmYtNyRov17xzF4WcWYNqyO8G65Yxbtm1bPQv+Sckmk3QHdiaYcxJkIqsQTMgDVsKOki5JgJPSRMEYFSQuC30WRdgXJRninK3K02aMlr81RnOsCSY+orr0OwlEmEn7XqeQf8JkHubfbHXUlQXKJytBEqKArXZEzkXLGXHGRPZpsR5hKsHLccnWXe65ut0Yx5Gos+DybvXp590Dub1cfO6vBl/+GP/1va3uco/oUh3421WK5iJmEdw4gcEHOPgci+SjOofY5OBwtowCLO9vtZzhKiQCT2Lky6srMAeQhWJB1WX1TZgLvN57BGsLDFgUZgss+Aam5AsGCstNbiRqvCpUY+V4hztq6SoZUtYw3966AAw+KMz+B362hp8GUiI4u9saj10GBYwilvMW67n0n7MZZSs/RFycoShiAgnCoqlcgyiZRzCR4hmcaUjRDabXLCFyAoh5dtZhzEgkML+4T3X3csC7ZeD7Ou6eAXbLOxbuTkfDGYORTtSQcRGyOYsQvSikw8JcOzAq5vzJWKywusVCbBQLoaVgZW0BWnzzr1x/5uXDH+p26WC8Lo02apTtVW7wMP5wHrbkPj50cMWBiINLH
@DanielCardonaRojas
DanielCardonaRojas / logging.dart
Created Mar 24, 2020
Logging mixin for Dart and Flutter projects
View logging.dart
import 'dart:convert';
import 'package:logger/logger.dart';
import 'package:meta/meta.dart';
mixin Logging {
Logger _logger;
Logger get log {
return _logger ??= Logger(
View Builder.swift
import Foundation
public typealias Adapter<T> = (inout T) -> Void
public class BuilderHandler<V> {
let adapter: Adapter<V>
public init(_ handler: @escaping Adapter<V>) {
self.adapter = handler
}
@DanielCardonaRojas
DanielCardonaRojas / CarouselLayout.swift
Last active Jul 10, 2020
Reference to create custom layout for UICollectionView
View CarouselLayout.swift
//
// CarouselLayout.swift
// Spotit
//
// Created by Daniel Cardona Rojas on 10/12/19.
// Copyright © 2019 Daniel Cardona. All rights reserved.
//
import UIKit
@DanielCardonaRojas
DanielCardonaRojas / ComposableStyles.swift
Created Nov 20, 2019
A small DSL to group and compose styles for UIKit components.
View ComposableStyles.swift
//
// Style.swift
// ComposableStyles
//
// Created by Daniel Cardona Rojas on 20/11/19.
// Copyright © 2019 Daniel Cardona Rojas. All rights reserved.
//
import UIKit
@DanielCardonaRojas
DanielCardonaRojas / KeyPathAutolayout.swift
Last active Nov 15, 2019
Declarative KeyPath based Autolayout combinators
View KeyPathAutolayout.swift
//
// KeyPathAutoLayout.swift
// Spotit
//
// Created by Daniel Cardona Rojas on 14/11/19.
// Copyright © 2019 Daniel Cardona Rojas. All rights reserved.
//
import UIKit
You can’t perform that action at this time.