Skip to content

Instantly share code, notes, and snippets.

Tomek Cejner tomekc

Block or report user

Report or block tomekc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View objects_in_lua.lua
-- Table based object with method
function newPerson(name)
local M = {
name = name,
age = 0,
}
M.greet = function (self)
print ("This is " .. self.name .. ", I am " .. self.age)
View composer_scene.lua
local composer = require( "composer" )
local scene = composer.newScene()
-- include Corona's "physics" library
local physics = require "physics"
function scene:create( event )
-- Called when the scene's view does not exist.
--
-- INSERT code here to initialize the scene
View puzzle15.html
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="">
<style type="text/css">
* {
@tomekc
tomekc / SwiftNinja2.swift
Created Aug 5, 2014
Solution to Ray Wenderlich's Swift Ninja challenge
View SwiftNinja2.swift
// Solution to ultimate Swift Nija challenge
// http://www.raywenderlich.com/77845/swift-ninja-part-2
enum Suit {
case Clubs, Diamonds, Hearts, Spades
}
enum Rank {
case Jack, Queen, King, Ace
case Num(Int)
View dabblet.css
* {
font-family: arial;
}
.diw {
border-radius: 10px;
width: 200px;
margin: auto;
}
@tomekc
tomekc / crashlog.txt
Created Sep 6, 2012
Ingredients.app crash log
View crashlog.txt
Process: Ingredients [63019]
Path: /Applications/Ingredients.app/Contents/MacOS/Ingredients
Identifier: net.fileability.ingredients
Version: 1.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: launchd [282]
User ID: 501
Date/Time: 2012-09-07 00:05:09.957 +0200
OS Version: Mac OS X 10.8.1 (12B19)
View SimpleAnimatoin.swift
//: Playground - noun: a place where people can play
// 1. Create new iOS playground
// 2. Paste this code
// 3. Enable timeline slider (on Utilities panel, alt+cmd+0 to show)
// 4. After letting the animation play, move the slider :)
import UIKit
import XCPlayground
@tomekc
tomekc / pom.xml
Created Nov 7, 2012 — forked from codahale/pom.xml
Take this and save it as pom.xml in your project directory.
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- none yet -->
@tomekc
tomekc / app.rb
Last active Oct 12, 2015
Sinatra kickstart boilerplate: HTML5 + Bootstrap + jQuery
View app.rb
require 'sinatra'
get '/' do
@name = ENV['USER']
erb :main
end
@tomekc
tomekc / CoronaSDK-Snippets.lua
Created Dec 3, 2015
Handy Corona SDK snippets for games
View CoronaSDK-Snippets.lua
-- Disable pixel smoothing
display.setDefault( "magTextureFilter", "nearest" )
-- Physics debugging: place in scene file in global scope
physics.setDrawMode( "hybrid" )
You can’t perform that action at this time.