Skip to content

Instantly share code, notes, and snippets.

View betopompolo's full-sized avatar

Adalberto Pompolo betopompolo

View GitHub Profile
@marslin1220
marslin1220 / RequestPlayground.swift
Last active April 7, 2025 08:06
How to create a HTTP GET request on Swift Playground
import Foundation
import PlaygroundSupport
URLCache.shared = URLCache(memoryCapacity: 0, diskCapacity: 0, diskPath: nil)
PlaygroundPage.current.needsIndefiniteExecution = true
// Refer to the example: https://grokswift.com/simple-rest-with-swift/
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todo/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
@lopspower
lopspower / README.md
Last active December 5, 2025 13:16
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha: