Skip to content

Instantly share code, notes, and snippets.

View marcelosalloum's full-sized avatar

Marcelo Salloum dos Santos marcelosalloum

  • Stellar Development Foundation
  • Bay Area, CA
View GitHub Profile
@marcelosalloum
marcelosalloum / account_rotation_test.go
Last active March 18, 2025 14:54
Test file that validates the maximum number of operations possible in a Stellar account rotation transaction.
package integrationtests
import (
"fmt"
"testing"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
"github.com/stellar/go/network"
"github.com/stellar/go/txnbuild"
@marcelosalloum
marcelosalloum / QRCode.tsx
Created May 15, 2020 13:07
A react js QR Code component written in typescript
import React from "react";
import styled from "styled-components";
const QRCodeImage = styled.img<{ size: number }>`
width: ${({ size }) => size};
height: ${({ size }) => size};
`;
type Props = {
value: string;
### STAGE 1: Build ###
FROM node:12.10.0-alpine as builder
WORKDIR /app
COPY package.json package-lock.json ./
COPY public/ public/
COPY src/ src/
RUN npm install

Keybase proof

I hereby claim:

  • I am marcelosalloum on github.
  • I am marcelosalloum (https://keybase.io/marcelosalloum) on keybase.
  • I have a public key ASC4PcHz6Lry4QRbeA-I56smQWPO8IDgfvD08Rs8XAUQago

To claim this, I am signing this object:

@marcelosalloum
marcelosalloum / ContentView_v3.swift
Created October 14, 2019 13:26
HUD usage on medium post - v6
import SwiftUI
struct ContentView: View, HUD {
var body: some View {
ZStack {
Color.black.edgesIgnoringSafeArea(.all)
VStack(spacing: 100) {
Button(action: {
self.showSuccessHUD(withStatus: "BTN 1 Clicked")
}, label: {
@marcelosalloum
marcelosalloum / HUD_PoP_facade.swift
Created October 14, 2019 13:22
HUD usage on medium post - p5
import SVProgressHUD
protocol HUD {
func showSuccessHUD(withStatus status: String, delay: TimeInterval)
}
extension HUD where Self: View {
func showSuccessHUD(withStatus status: String, delay: TimeInterval = 2) {
SVProgressHUD.setBackgroundColor(.white)
SVProgressHUD.setForegroundColor(.black)
@marcelosalloum
marcelosalloum / HUD_facade.swift
Created October 14, 2019 13:04
HUD usage on medium post - p4
import SVProgressHUD
struct HUD {
static func showSuccessHUD(withStatus status: String, delay: TimeInterval = 2) {
SVProgressHUD.setBackgroundColor(.white)
SVProgressHUD.setForegroundColor(.black)
SVProgressHUD.showSuccess(withStatus: status)
SVProgressHUD.dismiss(withDelay: delay)
}
}
@marcelosalloum
marcelosalloum / ContentView_v2.swift
Created October 14, 2019 12:52
HUD usage on medium post - p3
import SVProgressHUD
import SwiftUI
struct ContentView: View {
private func showSuccessHUD(withStatus status: String, delay: TimeInterval = 2) {
SVProgressHUD.setBackgroundColor(.white)
SVProgressHUD.setForegroundColor(.black)
SVProgressHUD.showSuccess(withStatus: status)
SVProgressHUD.dismiss(withDelay: delay)
}
@marcelosalloum
marcelosalloum / HUD_repeated_code.swift
Created October 14, 2019 12:47
HUD usage on medium post - p2
SVProgressHUD.setBackgroundColor(.white)
SVProgressHUD.setForegroundColor(.black)
SVProgressHUD.showSuccess(withStatus: "BTN 2 Clicked")
SVProgressHUD.dismiss(withDelay: 2)
@marcelosalloum
marcelosalloum / ContentView_v1.swift
Created October 14, 2019 12:44
HUD usage on medium post - v1
import SVProgressHUD
import SwiftUI
struct ContentView: View, HUD {
var body: some View {
ZStack {
Color.black.edgesIgnoringSafeArea(.all)
VStack(spacing: 100) {
Button(action: {
SVProgressHUD.setBackgroundColor(.white)