Skip to content

Instantly share code, notes, and snippets.

View aciidgh's full-sized avatar

Ankit Aggarwal aciidgh

View GitHub Profile
time lux build \
--bob-url $BOB_URL \
--zipped-snapshot-override-id 4~BcuRugAGrhk4_9SJsZGK5Rjy3D1whbNsVuTJaQw= \
--train XBSTwentyOneDotFiveRome \
--snapshot-update XBSTwentyOneDotFiveRome2122B185 \
--projects Phaser xbsdispatch CoreXBS BuildInfraPackages \
--build-sandbox-state disabled \
--build-system photon \
--source-layout xbsProject \
--disable-function-cache
@aciidgh
aciidgh / HTML.swift
Created May 15, 2024 13:37
HTML resultBuilder example
import Foundation
/// Helper for creating HTML document in Swift using resultbuilders.
package struct HTML: HTML.Tag {
package protocol Tag {
var elementName: String { get }
}
package let elementName: String = "html"
@aciidgh
aciidgh / swift.sublime-build
Created April 21, 2024 14:35
swift.sublime-build
{
"cmd": ["swift", "build"],
"keyfiles": ["Package.swift"],
"variants": [
{
"name": "release",
"cmd": ["swift", "build", "-c", "release"]
},
{
"name": "test",
import Foundation
struct StringCodingKey: CodingKey {
var stringValue: String
init(stringValue: String) {
self.stringValue = stringValue
}
var intValue: Int? { return nil }
init?(intValue: Int) { fatalError() }
}
@aciidgh
aciidgh / server.py
Created October 15, 2016 06:09
Python multithreaded server
#! /usr/bin/env python
# Standard library imports.
from SocketServer import ThreadingMixIn
import BaseHTTPServer
import SimpleHTTPServer
import sys
import json
import os
from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext,
#!/bin/sh
set -e
NINJA_RELEASE_ASSERT_DIR="${HOME}/Documents/workspaces/xcode/github/apple/build/Ninja-ReleaseAssert"
SOURCE_ROOT="${HOME}/Documents/workspaces/xcode/github/apple"
echo "Updating sources (except SwiftPM)"
${SOURCE_ROOT}/swift/utils/update-checkout --skip-repository swiftpm
echo "Done updating sources"
protocol DumbTerminalProtocol {
func write(_ string: String)
func endLine()
func flush()
}
protocol RichTerminalProtocol: DumbTerminalProtocol {
var width: Int { get }
func clearLine()
func moveCursor(y: Int)
@aciidgh
aciidgh / .py
Last active June 22, 2016 16:56
import json
import os
import pipes
import subprocess
import sys
import lit.Test
import lit.TestRunner
import lit.formats.base
@aciidgh
aciidgh / make-toolchain.sh
Last active June 6, 2016 17:54
Creates a toolchain on linux from a build created with `./swift/utils/build-script -R --llbuild --swiftpm --foundation --xctest`
#!/bin/sh
set -e
if [ -z "${CONFIGURATION}" ]; then
CONFIGURATION=debug
fi
PLATFORM='unknown'
unamestr=`uname`
client:
name: swift-build
tools: {}
targets:
test: []
default: [<SeaExec.module>, <SeaLib.Foo>, <SeaLib.Bar>, <SeaExec.exe>, <SeaLib.module>]
commands:
/Users/aciid/mycode/swiftpmProjects/SwiftCMixed/.build/debug/SeaExec.build:
tool: mkdir
outputs: [/Users/aciid/mycode/swiftpmProjects/SwiftCMixed/.build/debug/SeaExec.build]