Skip to content

Instantly share code, notes, and snippets.

View iksnae's full-sized avatar

K Mills iksnae

View GitHub Profile
@4np
4np / HowTo use xcconfig or plist with SPM.md
Last active August 5, 2024 11:06
How to use a .xcconfig file and a .plist with a Swift Package Manager based project.

How to use a .xcconfig file and a .plist file with SPM

Worth a read for some more context.

Create a Package.xcconfig file

Create the file in the root of the project (where your Package.swift file lives as well), and use the following contents:

/// Package.xcconfig
@RobertMenke
RobertMenke / query-param.codable.swift
Last active February 28, 2023 10:24
Swift Codable to URL Query String
import Foundation
import DictionaryCoding
/// Note: This relies on the DictionaryCoding package https://github.com/elegantchaos/DictionaryCoding
struct QueryParamEncoder {
func encode<T: Encodable>(_ item: T) throws -> String {
let encoder = DictionaryEncoder()
let encoded: [String: Any] = try encoder.encode(item)
let queryParams = encodeDictionary(encoded)
@ravihansa
ravihansa / index.js
Created February 11, 2020 10:11
Read text file in AWS S3 using Nodejs~
const s3 = require('aws-sdk/clients/s3'); // npm install aws-sdk
async function readFile() {
try {
var s3Data = await readTxtFile();
console.log(s3Data);
} catch (err) {
console.log('Error:', err);
}
}
@iksnae
iksnae / api.yml
Created June 17, 2023 15:30
screenplayer-api
version: '3'
services:
openapi-mock:
container_name: openapi_mock
image: muonsoft/openapi-mock
ports:
- '8080:8080'
environment:
- OPENAPI_MOCK_SPECIFICATION_URL=/app/api.yml
volumes:
import os
import autogen
import memgpt.autogen.memgpt_agent as memgpt_autogen
import memgpt.autogen.interface as autogen_interface
import memgpt.agent as agent
import memgpt.system as system
import memgpt.utils as utils
import memgpt.presets as presets
import memgpt.constants as constants
import memgpt.personas.personas as personas