Skip to content

Instantly share code, notes, and snippets.

@shakesoda
shakesoda / utf8.lua
Last active August 29, 2015 14:08 — forked from markandgo/utf8.lua
-- $Id: utf8.lua 179 2009-04-03 18:10:03Z pasta $
--
-- Provides UTF-8 aware string functions implemented in pure lua:
-- * string.utf8len(s)
-- * string.utf8sub(s, i, j)
-- * string.utf8reverse(s)
-- * string.utf8char(unicode)
-- * string.utf8unicode(s, i, j)
-- * string.utf8gensub(s, sub_len)
--
@shakesoda
shakesoda / demo.lua
Last active August 29, 2015 14:07 — forked from LPGhatguy/demo.lua
local glfw = require("glfw3") --Let's say we have a magic GLFW3 binding there!
local openGL = require("opengl")
openGL.loader = glfw.GetProcAddress
openGL:import()
--and somewhere else
local vbo = ffi.new("GLuint[1]")
gl.GenBuffers(1, vbo)
gl.BindBuffer(GL.ARRAY_BUFFER, vbo[0])
gl.BufferData(GL.ARRAY_BUFFER, ffi.sizeof(vertices), vertices, GL.STATIC_DRAW)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dogwalk" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="10"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".KevinWynneScheduleActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="adnroid.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>