Skip to content

Instantly share code, notes, and snippets.

View sztomi's full-sized avatar

Tamás Szelei sztomi

View GitHub Profile
@sztomi
sztomi / LICENSE.txt
Created October 28, 2011 20:02 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
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
@sztomi
sztomi / cindex.py
Created February 16, 2014 20:06
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).
# 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.
#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 / imgui_1
Created March 15, 2014 21:23 — forked from Koshmaar/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)
@sztomi
sztomi / func_try_block.cpp
Created May 7, 2014 14:17
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.
#include <chrono>
#include <iostream>
#include <mutex>
#include <thread>
struct ExpensiveFoo
{
ExpensiveFoo()
{
std::cout << "ExpensiveFoo default constructor... ";
[tool.poetry]
name = "pretty_plz"
version = "0.1.3"
description = "pretty_plz is a tool that turns utility scripts into runnable commands"
authors = ["Tamás Szelei <szelei.t@gmail.com>"]
license = "MIT"
homepage = "https://github.com/sztomi/pretty_plz/"
repository = "https://github.com/sztomi/pretty_plz/"
keywords = ["productivity", "commandline", "cli"]
classifiers = [
use std::env;
use std::mem;
use std::os::raw::c_int;
use std::path::PathBuf;
use std::ptr;
use anyhow::Result;
use sciter::dom;
use sciter::dom::event::{EventHandler, DRAW_EVENTS, EVENT_GROUPS};
use sciter::dom::{Element, HELEMENT};
@sztomi
sztomi / bwrap-args
Created June 3, 2022 10:12
bwrap-args contents
--bind
/tmp
/tmp
--symlink
usr/sbin
/sbin
--ro-bind
/media
/media
--symlink
@sztomi
sztomi / gist:ff051599cf318cb72eff91b01f86a343
Created November 6, 2023 11:47
clang-bootstrap cmake defs
'-DCMAKE_BUILD_TYPE=Release',
'-DENABLE_X86_RELAX_RELOCATIONS=ON',
'-DCLANG_DEFAULT_CXX_STDLIB=libc++',
'-DCLANG_DEFAULT_LINKER=lld',
'-DCLANG_DEFAULT_OBJCOPY=llvm-objcopy',
'-DCLANG_DEFAULT_RTLIB=compiler-rt',
'-DCLANG_DEFAULT_UNWINDLIB=libunwind',
'-DCLANG_ENABLE_BOOTSTRAP=ON',
'-DCLANG_LINKS_TO_CREATE=clang++;clang-cpp',
'-DLLVM_BUILD_TESTS=OFF',
@sztomi
sztomi / linux.yml
Created November 8, 2023 13:02
toolchain.yml
settings:
host:
os: Linux
arch: x86_64
build_type: Release
build:
os: Linux
arch: x86_64
build_type: Release