Skip to content

Instantly share code, notes, and snippets.

View ArchieR7's full-sized avatar
πŸ‘¨β€πŸ’»

Archie Chang ArchieR7

πŸ‘¨β€πŸ’»
View GitHub Profile
var token = "";
function doPost(request) {
if (token != request.parameter.token) {
return;
}
const text = request.parameter.text;
const textForSlack = getAdSenseResponse(text);
const response = {"response_type": "in_channel", "text": textForSlack};
return ContentService.createTextOutput(JSON.stringify(response)).setMimeType(ContentService.MimeType.JSON);
protocol SomeProtocol {
associatedtype SomeType: Decodable
var bar: String { get }
}
struct Foo: SomeProtocol {
struct SomeType: Decodable {
let bar: String
}
struct CustomTableViewCellModel {
let title: String
let content: String?
}
class CustomTableViewCell: UITableViewCell {
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var contentTextView: UITextView!
var viewModel: CustomTableViewCellModel? {
{
"campaign": {
"uuid": "ed43c9de-ce4d-4924-a7fe-0714e4ced77e",
"network": "eth", // e.g. eth, polygon, tt, bnb
"name": "campaign name",
"description": "campaign descritpion",
"validated_description": "validated!",
"redeemed_description": "redeemed!",
"image_url": "https://mainnet-cdn.redreamer.io/logo.png",
"contract_addresses": [