Skip to content

Instantly share code, notes, and snippets.

View AlexJuca's full-sized avatar
💭
I may be slow to respond.

Alexandre Antonio Juca AlexJuca

💭
I may be slow to respond.
  • Currently a Software Engineer at Yoco
  • Portugal
  • X @0xFFA4
View GitHub Profile
@AlexJuca
AlexJuca / squircle.swift
Created January 6, 2023 09:59 — forked from gaosa/squircle.swift
Squircle in SwiftUI
// Run in Swift Playground
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
Rectangle()
.fill(Color.red)
.frame(width: 200, height: 200)
@AlexJuca
AlexJuca / GitCommitBestPractices.md
Created December 25, 2022 15:55 — forked from luismts/GitCommitBestPractices.md
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@AlexJuca
AlexJuca / readability.css
Created November 29, 2022 23:04 — forked from splch/readability.css
CSS rules optimized for site readability
:root {
--bg-color: #ffffff;
--font-color: #000000;
/* highest contrast colors
for light and dark themes */
--red: #ec0000;
--green: #008900;
--blue: #5f5fff;
--gray: #757575;
}
package des.c5inco.cardswipecompose
import androidx.compose.animation.core.*
import androidx.compose.animation.splineBasedDecay
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.awaitFirstDown
import androidx.compose.foundation.gestures.verticalDrag
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
@AlexJuca
AlexJuca / Instructions.md
Created September 17, 2021 16:53 — forked from NickCraver/Microsoft.PowerShell_profile.ps1
Craver's oh-my-posh profile

Included here are the PowerShell profile I use as well as the oh-my-posh 3 config, but in addition to these you'll need:

  1. The PowerShell modules:
    • For git in PowerShell, I use posh-git
    • For prompt customization, I use oh-my-posh
    • For file/folder icons I use the excellent Terminal-Icons package by @devblackops: https://github.com/devblackops/Terminal-Icons
    • To install each:
Install-Module -Name posh-git -Repository PSGallery
Install-Module -Name oh-my-posh -Repository PSGallery
@AlexJuca
AlexJuca / softwareengineeringexcel.md
Created June 7, 2021 13:17 — forked from arttuladhar/softwareengineeringexcel.md
Software Engineering Competency Checklist

Software Engineering Excellency

DATA STRUCTURES
  • Doesn’t know the difference between Array and LinkedList
  • Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks
  • Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.
  • Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc
ALGORITHMS
  • Unable to find the average of numbers in an array
val proxyPay = ProxyPayPayment()
proxyPay.config = ProxyPayConfig.getInstance()
proxyPay.referenceRequest = request
...
private void makeNormal(Customer customer) {

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@AlexJuca
AlexJuca / PULL_REQUEST_TEMPLATE
Created April 23, 2019 22:28 — forked from riggaroo/PULL_REQUEST_TEMPLATE
Pull request template format. Add this file to your .github folder
<!--- Provide a general summary of your changes in the Title above -->
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning -->
## Description
<!--- Describe your changes in detail -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
@AlexJuca
AlexJuca / observer.kt
Created August 20, 2018 11:51
Kotlin Observer Pattern
import kotlin.properties.Delegates
fun main(args: Array<String>) {
val kumbu = Wallet(0)
kumbu.listener = AccountChangedListener()
println("Saldo geral: ${kumbu.balance}")
kumbu.premiumAccount = true
println(kumbu.premiumAccount)
kumbu.premiumAccount = false