Skip to content

Instantly share code, notes, and snippets.

Tamás Szelei sztomi

Block or report user

Report or block sztomi

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
@sztomi
sztomi / func_try_block.cpp
Created May 7, 2014
This file demonstrates the usage of function try blocks for implementing thread-safe copy constructors. Note, that the equality operator for ExpensiveFoo is omitted (implicitly default), so in reality, there would be even more time spent in the BarSlow copy constructor than in this example.
View func_try_block.cpp
#include <chrono>
#include <iostream>
#include <mutex>
#include <thread>
struct ExpensiveFoo
{
ExpensiveFoo()
{
std::cout << "ExpensiveFoo default constructor... ";
View imgui_1
// class Enemies, function Update():
if (CONFIG::debug)
{
if (FlxG.keys.SHIFT && FlxG.keys.justPressed("D"))
{
// kill all enemies
for each ( var enemy : Enemy in members)
{
if (enemy.alive && enemy.exists)
View gist:9366176
#include <boost/python.hpp>
#include "textcomponent.h"
using namespace boost::python;
BOOST_PYTHON_MODULE(CodegenExample)
{
class_<TextComponent>("TextComponent")
.def("text", &TextComponent::text)
.def("setText", &TextComponent::setText)
@sztomi
sztomi / cindex.py
Created Feb 16, 2014
This is a patched cindex.py that exposes access specifiers on Cursors.The patch was submitted to the clang project. If it gets approved, this file will be obselete (and likely removed).
View cindex.py
# This is a patched cindex.py that exposes access specifiers on Cursors.
# The patch was submitted to the clang project. If it gets approved,
# this file will be obselete (and likely removed).
#===- cindex.py - Python Indexing Library Bindings -----------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
@sztomi
sztomi / LICENSE.txt
Created Oct 28, 2011 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
You can’t perform that action at this time.