Skip to content

Instantly share code, notes, and snippets.

View rayburgemeestre's full-sized avatar

Ray Burgemeestre rayburgemeestre

View GitHub Profile
@rayburgemeestre
rayburgemeestre / testcase3.cpp
Created January 12, 2017 09:05
cannot get class defined as EC6 class as value with v8
/*
In my case, compile with:
/usr/bin/c++ --std=c++14 -I${PWD}/fmt -I${PWD}/include testcase3.cpp -o testcase -L$PWD/lib $PWD/lib/libv8_base.a -lv8_libbase $PWD/lib/libv8_nosnapshot.a -lv8_libplatform $PWD/lib/libv8_libsampler.a -licui18n -licuuc -Wl,-rpath,$PWD/lib -pthread
Run with ./testcase
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@rayburgemeestre
rayburgemeestre / testcase.cpp
Last active January 11, 2017 08:15
V8 stackoverflow question
/*
In my case, compile with:
/usr/bin/c++ --std=c++14 -I${PWD}/include testcase2.cpp -o testcase -L$PWD/lib $PWD/lib/libv8_base.a -lv8_libbase $PWD/lib/libv8_nosnapshot.a -lv8_libplatform $PWD/lib/libv8_libsampler.a -licui18n -licuuc -Wl,-rpath,$PWD/lib -pthread
Run with ./testcase
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
(gdb) r
Starting program: /projects/cheerp/cheerp-utils/tests/server/async_chat
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
1456442248 INFO pion.http.plugin_server : Added request handler for HTTP resource:
1456442248 INFO pion.http.plugin_server : Loaded web service plug-in for resource (): FileService.so
1456442248 INFO pion.http.plugin_server : Set web service option for resource (/): directory=.
1456442248 INFO pion.http.plugin_server : Added request handler for HTTP resource: /cheerp_call
1456442248 INFO pion.http.plugin_server : Starting server on port 1987
1456442248 INFO pion.scheduler : Starting thread scheduler
@rayburgemeestre
rayburgemeestre / gist:ddd88253efd46f8dd925
Created February 21, 2016 18:02
async_chat + pion5 problem with promises
trigen@FIREFLY:/projects/cheerp-utils/tests/server[pion5]> gdb ./async_chat
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@rayburgemeestre
rayburgemeestre / gist:fbbe2816906fec967e7a
Created February 11, 2016 10:05
tampermonkey_kanbanflow_time_spent_per_day.js
// ==UserScript==
// @name Add time spent per day in "Done" column Kanbanflow.
// @namespace http://cppse.nl/
// @version 0.1
// @description Add time spent per day in "Done" column Kanbanflow.
// @match https://kanbanflow.com/board/*
// @copyright 2012+, Ray Burgemeestre
// @updateURL http://cppse.nl/public/tampermonkey_kanbanflow_time_spent_per_day-meta.js
// @downloadURL http://cppse.nl/public/tampermonkey_kanbanflow_time_spent_per_day.js
// ==/UserScript==
@rayburgemeestre
rayburgemeestre / gist:d72c20b549c2355dfc54
Created March 15, 2015 19:37
Calculate possible merge order permutations
#include <iostream>
#include <vector>
using namespace std;
template <typename T>
void print_vector(vector<T> &A, size_t counter)
{
cout << "" << counter << ") ";
@rayburgemeestre
rayburgemeestre / gist:eba6b928821f97c1b3e6
Created November 14, 2014 12:24
tampermonkey_agile_board_plan_blocked.js
// ==UserScript==
// @name Visualize blocked tickets in current sprint on Jira Agile board Plan board.
// @namespace http://cppse.nl
// @version 1.0
// @description It will fetch all `status != Done` issues in the current sprint with an API call,
// and see if there are "is blocked by" relations to tickets that are not yet `status = Done`.
// @author Ray Burgemeetre
// @match https://*.atlassian.net/secure/RapidBoard.jspa*view=planning*
// @grant none
// ==/UserScript==
@rayburgemeestre
rayburgemeestre / tampermonkey_agile_board_prios.js
Last active February 17, 2021 12:54
Tampermonkey jira priority
// ==UserScript==
// @name Visualize issue ranks in the Jira Agile board
// @namespace http://cppse.nl
// @version 2.3.4.3
// @description It will search for the ranks using an Ajax Jira API call with two seconds in between
// and update the board with colored rank indicators.
// @author Ray Burgemeetre
// @match https://*/secure/RapidBoard.jspa*
// @updateURL http://cppse.nl/public/tampermonkey_agile_board_prios-meta.js
// @downloadURL http://cppse.nl/public/tampermonkey_agile_board_prios.js
@rayburgemeestre
rayburgemeestre / scope.php
Created September 12, 2014 10:34
ScopedResourceAllocator
<?php
class ScopedResourceAllocator
{
private $closure = null;
public function __construct(Closure $closure)
{
$this->closure = $closure;
}
public function __destruct()
{