Skip to content

Instantly share code, notes, and snippets.

View IsaiasSantana's full-sized avatar
🎯
Focusing

Isaías Santana IsaiasSantana

🎯
Focusing
View GitHub Profile
@IsaiasSantana
IsaiasSantana / CollectionView.swift
Created November 11, 2024 02:27 — forked from KazaiMazai/CollectionView.swift
Better SwiftUI wrapper for UICollectionView
import SwiftUI
extension CollectionView {
typealias UIKitCollectionView = CollectionViewWithDataSource<SectionIdentifierType, ItemIdentifierType>
typealias DataSource = UICollectionViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType>
typealias Snapshot = NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>
typealias UpdateCompletion = () -> Void
}
struct CollectionView<SectionIdentifierType, ItemIdentifierType>
@IsaiasSantana
IsaiasSantana / advent-of-code-day-1.go
Created December 6, 2023 19:27
Advent of code 2023, day 1
package main
import (
"bufio"
"log"
"os"
"regexp"
"strconv"
"unicode/utf8"
)
@IsaiasSantana
IsaiasSantana / StackScrollView.swift
Last active October 10, 2024 01:25
A simple Scrollable UIStackView with ScrollView.
import Foundation
import UIKit
final class Stack: UIView {
private let stackView: UIStackView = {
let stack = UIStackView()
stack.axis = .vertical
stack.distribution = .fill
stack.alignment = .fill
stack.translatesAutoresizingMaskIntoConstraints = false
#!/bin/bash
current_branch=`git branch | grep '*' | sed 's/* //'`
green=`tput setaf 2`
reset=`tput sgr0`
red=`tput setaf 1`
yellow='\033[1;33m'
echo "\nVerificando seu commit no branch ${green} $current_branch ${reset} (: Aguarde...."
echo "\n${red}Formatando o código.........${reset}\n"
@IsaiasSantana
IsaiasSantana / UIView+shimmer.swift
Last active March 5, 2019 19:21
Simple shimmer effect into uiview
extension UIView {
private enum ShimmerViews: Int {
case backgroundView = 1234
case shimmerView = 123
}
func startShimmer() {
func createUIView(withTag tag: ShimmerViews, backgroundColor color: UIColor) -> UIView {
let view = UIView(frame: CGRect(x: 0, y: 0, width: frame.width, height: frame.height))
view.tag = tag.rawValue
@IsaiasSantana
IsaiasSantana / estados-cidades.json
Created November 29, 2017 01:40 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",