Skip to content

Instantly share code, notes, and snippets.

@mmmunk
mmmunk / Client.dpr
Last active March 25, 2020 17:03
Base principles for Indy Server and Client in Delphi (with extra clients in other frameworks too)
program Client; {$APPTYPE CONSOLE}
uses
Windows, SysUtils, IdTCPClient;
var
TcpClient: TIdTCPClient;
S: string;
begin
@shmidt
shmidt / Swift3Base64.swift
Last active September 19, 2022 08:18 — forked from stinger/Swift3Base64.swift
Swift 3: Base64 encoding and decoding strings
//: # Swift 3: Base64 encoding and decoding
import Foundation
extension String {
//: ### Base64 encoding a string
func base64Encoded() -> String? {
if let data = self.data(using: .utf8) {
return data.base64EncodedString()
}
return nil