Skip to content

Instantly share code, notes, and snippets.

View mfoliveira's full-sized avatar

Mauricio Faria de Oliveira mfoliveira

View GitHub Profile
@mfoliveira
mfoliveira / nothing.preseed
Created December 5, 2018 20:26
an ubuntu install preseed file with nothing inside.
# nothing
@mfoliveira
mfoliveira / Fibonacci.cpp
Created May 5, 2011 20:07
Yield in C/C++ using Macros
#include "yield.h"
class Fibonacci {
protected:
/* Yield's internal */
void *YIELD_POINTER;
/* Fibonacci terms */
@mfoliveira
mfoliveira / list_comprehension.cpp
Created January 5, 2011 01:52
Single-variable List Comprehension in C++ using Preprocessor Macros
/* Single-variable List Comprehension in C++ using Preprocessor Macros
*
* (C) Copyright 2011, Mauricio Faria de Oliveira
* http://mfoliveira.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
@mfoliveira
mfoliveira / evrouter-0.4_with_key_repeats_option.patch
Created December 24, 2010 17:02
Provide an option (--key-repeats/-r) for enabling key repeats in XButton actions (for EvRouter 0.4)
diff -Naur evrouter-0.4/src/action_xbutton.c evrouter-0.4/src.new/action_xbutton.c
--- evrouter-0.4/src/action_xbutton.c 2009-03-02 21:01:43.000000000 -0300
+++ evrouter-0.4/src.new/action_xbutton.c 2010-12-24 14:24:32.000000000 -0200
@@ -84,7 +84,11 @@
XTestFakeButtonEvent (d, r->action.xbutton.button, True, 0);
break;
- case 2: /* Ignore key repeats */
+ case 2: /* Key repeats */
+ if (key_repeats) {
@mfoliveira
mfoliveira / Random.h
Created October 21, 2010 18:48
On-Demand Random Number Generator
/* On-Demand Random Number Generator
*
* (C) Copyright 2010, Mauricio Faria de Oliveira
* http://mfoliveira.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/