Skip to content

Instantly share code, notes, and snippets.

View IngwiePhoenix's full-sized avatar
💭
Working on IngwiePhoenix/IceTea ... trying out a JavaScript aproach. O.o...

Ingwie Phoenix IngwiePhoenix

💭
Working on IngwiePhoenix/IceTea ... trying out a JavaScript aproach. O.o...
View GitHub Profile
@IngwiePhoenix
IngwiePhoenix / array.cpp
Created January 25, 2019 20:22
gravity-c++-wrapper-ideas
namespace Gravity {
<template T>
class TypedArray {
private:
typedef marray_t(T) array_struct;
array_struct arr;
public:
TypedArray() { marray_init(this->arr); }
TypedArray(array_struct arr) { this->arr = arr; }
@IngwiePhoenix
IngwiePhoenix / gravity_api_oop.cpp
Last active December 25, 2018 20:02
gravity c api - oop
/**
* @file
* Demonstrating how to use classes or opaque data types
* within Gravity.
*
* This does NOT use xData attached to functions...
* but rather gravity_instance_t's xdata.
*/
#include <stdio.h>
@IngwiePhoenix
IngwiePhoenix / exec_c_xdata.c
Created December 24, 2018 23:42
gravity c api - using xdata
// Based on gravity/api/exec_c.c
#include <stdio.h>
#include <math.h>
#include "gravity_compiler.h"
#include "gravity_macros.h"
#include "gravity_vm.h"
#include "gravity_core.h"
#include "gravity_value.h"
@IngwiePhoenix
IngwiePhoenix / buildit.wren
Created December 3, 2018 15:22
IceTea concept in Wren
import "Toolchains/Native" for Native
import "FLTK" for libfltk
import "Detector/CC" for CC_Detector
namespace("IngwiePhoenix") {|ns|
// @var ns: Current namespace object. Can be omitted.
Native.executable("MyApp") {|t|
// @var t: Current target
/**
* @file
* Kleines Beispiel einer Main Methode.
*
* @author Kevin Ingwersen
*/
class MainExample {
// Als aller Erstes definieren wir mal eine kleine Methode...
/**
* @file
* Implementierung des chinesischen Spiels "Baguenaudier".
* @see Aufgabe 4.2
* @author Kevin Ingwersen
*/
/**
* @section Spielregeln
* Kurze zusammenfassung der Regeln (angelegt aus Eigeninteresse).
@IngwiePhoenix
IngwiePhoenix / .env
Created November 7, 2018 19:05
docker-mailserver issue #1075
# -----------------------------------------------------------------------------------------------------------------------------
# --------------------- General Settings --------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
HOSTNAME="ingwie-io"
DOMAINNAME="ingwie.io"
CONTAINER_NAME=mail
# empty => uses the `hostname` command to get the mail server's canonical hostname
Ingwie@Ingwies-Macbook-Pro.local /p/tmp $ node
> var fs = require("fs")
undefined
> var data = fs.readFileSync("./input.txt")
undefined
> data.toString().trim().split(" ").forEach(function(e){ process.stdout.write(String.fromCharCode(Number("0b"+e))) })
Ich Liebe dich mein Engel... Antonia du bist kein einfaches Mädchen ... du bist mein Mädchen undefined
@IngwiePhoenix
IngwiePhoenix / index.md
Created October 7, 2018 16:02
Basic Markdown
# Heading 1
## Heading 2
### Heading 3
... continues to heading 6 ...

Using ` (backtick) will start code...However, use three of them, followed by alanguage name - such as PHP - and you tell the
respective program to show syntax highlighting.

@IngwiePhoenix
IngwiePhoenix / main.md
Created September 17, 2016 23:48
Mac app structure

A Mac Application is structured as a bundle. Assume you have a Hello World application in Objective-C, the most "by-hand" way to build the bundle would be so:

Code:

// Copied from: http://macosx-programming.blogspot.de/2011/09/simple-gui-hello-world-using-cocoa.html
#include <Cocoa/Cocoa.h>

int main(int argc, const char** argv)
{
 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];