Skip to content

Instantly share code, notes, and snippets.

View annulen's full-sized avatar

Konstantin Tokarev annulen

  • Department of Chemistry, Moscow State University
  • Moscow, Russia
  • 16:22 (UTC +03:00)
View GitHub Profile
@annulen
annulen / 01.flags.lua
Last active August 29, 2015 14:02
Proof of concept for sysdig code generation
flags {
poll = {
"POLLIN",
"POLLPRI",
"POLLOUT",
"POLLRDHUP",
"POLLERR",
"POLLHUP",
"POLLNVAL",
"POLLRDNORM",
@annulen
annulen / test-compiler-2.cc
Created May 6, 2013 16:42
Miscompiled with pathCC -O3, OK with pathCC -O2
namespace v8
{
template < class T > class Handle
{
T *val_;
};
class HandleScope
{
public:
HandleScope ();
" Vim color file
" Maintainer: Henry So, Jr. <henryso@panix.com>
" These are the colors of the "desert" theme by Hans Fugal " Vim color file
" Maintainer: Henry So, Jr. <henryso@panix.com>
" These are the colors of the "desert" theme by Hans Fugal with a few small
" modifications (namely that I lowered the intensity of the normal white and
" made the normal and nontext backgrounds black), modified to work with 88-
" and 256-color xterms.
Version = {}
function Version:clear()
for k,_ in ipairs(self) do
self[k] = nil
end
end
function Version:parse(str)
Daria.nop = function () {}, Daria.contextHelpPages = {}, Daria.checkHttps = function (a) {
a = a || Daria.nop;
var b = window,
c = b.location,
d = document;
if (c.protocol == "https:") b.httpsOk = !0, a();
else if ("httpsOk" in b) a();
else {
var e = d.createElement("script");
e.src = "https://" + c.host + "/neo2/js/https.js";
@annulen
annulen / qt-future.lua
Created November 9, 2011 09:13
Imaginary Premake extension which adds Qt support using non-yet-existing features
usage "Qt"
variables { "qtdir", "qtbin", "qtlib", "qtinclude", "mocdir", "mocflags", "uidir", "rccdir", "qmdir" }
compiler {
name = "moc",
typematcher = premake.qt.ismocableheader, -- function defined in qt-support.lua
outfilebuilder = function(infile)
return "%mocdir/moc_" .. path.getbasename(infile) .. ".cpp"
end,
buildcommands = { "%qtbin/moc %mocflags -nw -o %outfile %infile" }
@annulen
annulen / qmake.lua
Created October 27, 2011 20:02
QMake integration
--
-- qmake.lua
-- Runs qmake scripts and get variables from them
-- Copyright (c) 2011 Konstantin Tokarev
--
qmake = {}
local qmake_code = ""
@annulen
annulen / qt-support.lua
Created October 25, 2011 14:38
Support for Qt Framework for Premake
--
-- qt-support.lua
-- Support for Qt Framework for Premake
-- Copyright (c) 2011 Konstantin Tokarev
--
-- Version 1.0
--
-- Known limitations:
-- only gmake
-- on Mac OS X only framework configuration of Qt is supported