Skip to content

Instantly share code, notes, and snippets.

View dalonng's full-sized avatar
💭
I may be slow to respond.

dalonng dalonng

💭
I may be slow to respond.
View GitHub Profile
@eneko
eneko / LRUCacheActor.swift
Last active October 7, 2022 11:54
Thread-safe, ordered-dictionary-backed, actor-based LRU cache
//
// LRUCacheActor.swift
// LRUCacheActor
//
// Created by Eneko Alonso on 9/5/21.
//
import Foundation
import OrderedCollections
@smosko
smosko / OSLog+Extensions.swift
Last active December 26, 2022 07:54
Unified Logging Wrapper
import Foundation
@_exported import os.log
public extension OSLog {
convenience init(_ bundle: Bundle = .main, category: String? = nil) {
self.init(subsystem: bundle.bundleIdentifier ?? "default", category: category ?? "default")
}
convenience init(_ aClass: AnyClass, category: String? = nil) {
@NSExceptional
NSExceptional / XcodeBuildSettingsReference.md
Last active May 5, 2023 18:57
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)

@pete-otaqui
pete-otaqui / bumpversion.sh
Created December 2, 2012 11:08
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
@mbinna
mbinna / hack.sh
Created April 11, 2012 05:57 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh
#
@marcoleong
marcoleong / sample.lua
Created December 16, 2011 17:20
Lua cocos2d-x sample
require "hello2"
cocos2d.CCLuaLog("result is " .. myadd(3, 5))
-- create scene & layer
layerFarm = cocos2d.CCLayer:node()
layerFarm:setIsTouchEnabled(true)
layerMenu = cocos2d.CCLayer:node()