Skip to content

Instantly share code, notes, and snippets.

@akisute
akisute / iPad Air 2
Last active November 16, 2018 02:46
Handling Size Class, UITraitEnvironment, UIContentContainer on iOS 9 (beta 1)
////////////////
// on iPad Air 2
////////////////
// Boot as portrait
2015-06-15 19:57:47.597 ios9[16003:229076] viewDidLoad()
2015-06-15 19:57:47.598 ios9[16003:229076] viewWillAppear - false
2015-06-15 19:57:47.601 ios9[16003:229076] traitCollectionDidChange - nil
2015-06-15 19:57:47.602 ios9[16003:229076] viewWillLayoutSubviews()
2015-06-15 19:57:47.602 ios9[16003:229076] viewDidLayoutSubviews()
@CodaFi
CodaFi / alltheflags.md
Last active October 26, 2022 20:09
Every Option and Flag /swift (1.2) Accepts Ever

#Every Single Option Under The Sun

  • optimization level options
  • automatic crashing options
  • debug info options
  • swift internal options
  • swift debug/development internal options
  • linker-specific options
  • mode options
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@masuidrive
masuidrive / gist:5231110
Created March 24, 2013 08:45
clang options
OVERVIEW: LLVM 'Clang' Compiler: http://clang.llvm.org
USAGE: clang -cc1 [options] <inputs>
OPTIONS:
-### Print the commands to run for this compilation
--analyze Run the static analyzer
--migrate Run the migrator
--relocatable-pch Build a relocatable precompiled header
--serialize-diagnostics <value>
@belm0
belm0 / article_sc_and_lua_1.md
Last active September 21, 2023 06:37
Structured concurrency and Lua (part 1)

Structured concurrency and Lua (part 1)

John Belmonte, 2022-Sep

I've started writing a toy structured concurrency implementation for the Lua programming language. Some motivations:

  • use it as a simple introduction to structured concurrency from the perspective of Lua (this article)
  • learn the fundamental properties of structured concurrency and how to implement them
  • share code that could become the starting point for a real Lua library and framework

So what is structured concurrency? For now, I'll just say that it's a programming paradigm that makes managing concurrency (arguably the hardest problem of computer science) an order of magnitude easier in many contexts. It achieves this in ways that seem subtle to us—clearly so, since its utility didn't reach critical mass until around 2018[^sc_birth] (just as control structures like functions, if, and while weren't introduced to languages until long after the first compu

@jakebesworth
jakebesworth / main.lua
Last active November 1, 2023 19:50 — forked from Leandros/main.lua
Love2D 11.X Fix Your Timestep! "Free the physics" 4th approach
--[[
Original Author: https://github.com/Leandros
Updated Author: https://github.com/jakebesworth
MIT License
Copyright (c) 2018 Jake Besworth
Original Gist: https://gist.github.com/Leandros/98624b9b9d9d26df18c4
Love.run 11.X: https://love2d.org/wiki/love.run
Original Article, 4th algorithm: https://gafferongames.com/post/fix_your_timestep/
Forum Discussion: https://love2d.org/forums/viewtopic.php?f=3&t=85166&start=10
@shakna-israel
shakna-israel / Prose.md
Created October 23, 2019 23:32
Obfuscating Lua

Obfuscating Lua

I've had some fun ruining Python recently, but Python is what I use at work. I prefer to use other languages when I'm doing stuff for fun.

And obfuscation only really makes sense in fun and competition - given a suffeciently determined actor, your code will be reverse engineered. Unless you write it in Malboge.

For this particular experiment, I'll be using Lua 5.3. As I'll probably need to dive into some of the less portable functions to commit our atrocities, I can't guarantee it will run on other popular versions like Luajit or 5.1.


Write Games, Not Engines

by "scientificninja" (Josh Petrie?)

To begin with, the term "engine" (specifically as it related to the game development world) has no strict definition. Therefore, in the interests of keeping everybody on the same page, I'll define the term as I intend to use it in this article. An "engine" is a collection of robust, reusable software subsystems (possibly including both code libraries and tools) designed to facilitate the development of actual games by addressing specific requirements. The requirements tend to be broadly-defined: rendering, audio, physics, et cetera. Particularly ambitious engines that address multiple broad requirement groups tend be to known as "game engines" rather than just "graphics engines" or "physics engines."

Now that that's out of the way, let's turn to the real issue: how to build engines, and more specifically, if you should even bother.

For any number of reasons, many neophyte game developers (and even some moderately experienced ones) seem to t

@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR