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
@tomekc
tomekc / scene-template.lua
Created Dec 10, 2019
Corona SDK - scene template
View scene-template.lua
-- Include modules/libraries
local composer = require "composer"
-- Variables local to scene
--
-- Create a new Composer scene
local scene = composer.newScene()
View .vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
colorscheme espresso
set cul
hi CursorLine term=none cterm=none ctermbg=234
@tomekc
tomekc / .vimrc
Last active Sep 12, 2019
Vim awesome plugins
View .vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
set t_Co=256
set background=dark
colorscheme lost-shrine
set cul
@tomekc
tomekc / promises_branching.js
Created Aug 22, 2017
Branching inside promise chain (JavaScript, Bluebirdjs)
View promises_branching.js
var Promise = require('bluebird');
console.log('=== Branching promises demo ===');
function getNameById(id) {
return Promise.resolve("Ziutek");
}
/*
Add missing data to object.
View noise_level_meter.ino
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;
#define BLINK_LED 16
#define WIFI_LED_PIN 16
#define NUM_MEASURES 1200 // Sampling freq. is 20 hz
View monolity_mikroserwisy.md

Starcie monolitu i mikroserwisów

Obrona monolitu

Artykuł - Dan Haywood: In defence of Monolith Wyważone porównanie obu podejść. Część 2

Monolit musi być dobrze zmodularyzowany by był utrzymywalny. Prawdopodobnie większość monolitów taka nie jest.

Monolit dobrze się sprawdza w złożonej domenie biznesowej, mikroserwisy błyszczą tam, gdzie jest wielka skala.

@tomekc
tomekc / learn_bluebird.js
Last active Mar 15, 2016
Learning playground for Bluebird.js
View learn_bluebird.js
//
// npm install bluebird
// npm install superagent
//
var Promise = require('bluebird');
var request = require('superagent');
console.log('Promises with Bluebird');
function get(url) {
@tomekc
tomekc / CoronaSDK-Module.lua
Created Dec 4, 2015
Creating modules in Corona SDK
View CoronaSDK-Module.lua
local M = {}
function M.create()
-- initialize members: M.foo = "bar"
end
function M.foo()
end
return M
@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" )
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
You can’t perform that action at this time.