Skip to content

Instantly share code, notes, and snippets.

@aglitchman
aglitchman / device.lua
Last active April 4, 2026 13:15
Detect operating system (iOS, Android, Blackberry, Windows, Firefox OS, MeeGo), orientation (Portrait vs. Landscape), and type (Tablet vs. Mobile). Lua module for the Defold game engine.
-- Based on the device.js module: https://github.com/matthewhudson/current-device
-- MIT License
--
-- Usage:
-- local device = require("device")
-- if device.type == "mobile" then
-- -- do something!
-- end
--
-- Or:
@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 21, 2026 07:07
Orthodox C++

Orthodox C++

This article has been updated and is available here.