This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// real world example from json module of rust-web-server: https://github.com/bohdaq/rust-web-server/tree/main/src/json | |
// defining generics, library code | |
pub struct JSONArrayOfObjects<T> { | |
_item: T, // added to eliminate compiler error | |
} | |
pub trait New { | |
fn new() -> Self; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Homebrew build logs for bohdaq/rust-tls-server/rts on macOS 13 | |
Build date: 2022-12-28 20:19:02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function urlBase64ToUint8Array(base64String) { | |
const padding = '='.repeat((4 - base64String.length % 4) % 4); | |
const base64 = (base64String + padding) | |
.replace(/\-/g, '+') | |
.replace(/_/g, '/') | |
; | |
const rawData = window.atob(base64); | |
return Uint8Array.from([...rawData].map((char) => char.charCodeAt(0))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make sure you have installed https://github.com/fastlane/deliver#installation and finished Installation and Quick Start sections | |
# To use this script, simply put it in app directory and execute: | |
# ./automation.sh YOUR_PROJECT_NAME YOUR_EXPORT_PROVISIONING_PROFILE | |
rm -f $1.ipa | |
xcodebuild archive -workspace $1.xcworkspace -scheme $1 -archivePath $1.xcarchive | |
xcodebuild -exportArchive -archivePath $1.xcarchive -exportPath $1 -exportFormat ipa -exportProvisioningProfile "$2" |