Skip to content

Instantly share code, notes, and snippets.

View pietrocaselani's full-sized avatar

Pietro Caselani pietrocaselani

  • Florianópolis, Brasil
  • 04:25 (UTC -03:00)
  • X @pietropc_
View GitHub Profile
@SevioCorrea
SevioCorrea / PortugueseTCA.md
Last active August 23, 2023 16:24
An Portuguese Translation

The Composable Architecture

CI

The Composable Architecture (ou simplesmente TCA) é uma biblioteca para construir aplicativos de forma consistente e compreensível, tendo em mente composição, teste e ergonomia. Pode ser usado no SwiftUI, UIKit e em qualquer plataforma da Apple (iOS, macOS, tvOS e watchOS).

  • [O que é The Composable Architecture?](#o-
@cocuroci
cocuroci / URLSchemes.txt
Last active September 6, 2023 00:58
URLSchemes Bancos
Banco do Brasil = "bbapp://"
Bradesco = "BDNiPhoneVarejo://"
Bradesco Prime = "BDNiPhonePrime://"
Itaú = "itauvarejo://"
Itaú Personnalité = "itaupersonnalite://"
Santander = "santanderpf://"
Sicoob = "sicoob://"
Neon = "banconeon://"
Nubank = "nuapp://"
@zigadolar
zigadolar / UIImage+DiagonalCrop.swift
Last active November 23, 2022 19:19
Diagonally crop an image in Swift
/*
* Copyright (c) 2017 Ziga Dolar
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@alces
alces / ansible_local_playbooks.md
Last active July 6, 2024 09:49
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@krrr
krrr / brightness.ahk
Last active April 26, 2024 15:51
Windows screen brightness fine tune (autohotkey)
#,::
AdjustScreenBrightness(-3)
Return
#.::
AdjustScreenBrightness(3)
Return
AdjustScreenBrightness(step) {
service := "winmgmts:{impersonationLevel=impersonate}!\\.\root\WMI"
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@gvieira
gvieira / strer.bash
Created October 21, 2013 12:49
Adjust str encoding and rename it according to movie name.
# Set encoding to UTF-8
for f in *.srt; do iconv -f `file --mime-encoding -b "$f"` -t UTF-8 "$f" > "$f.u"; mv "$f.u" "$f"; done
# Rename according to movie
ls *.srt | while read f; do n=`grep -o 'S..E..' <<< "$f"`; m=`ls -1 *"$n"* | grep -v "\.srt$"`; o=${m%.*}; mv "$f" "$o.srt"; done