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 / 01-how-to-use.md
Created December 28, 2015 12:07
Webpack EJS widgets
  • Clone the gist.
  • Run: npm install ejs-compiled-loader
  • Run: webpack --config 02-webpack.config.js
  • Watch the magic happen.

This should split into two output JS files. One has the code fromt he entry, the other has the widget. Its loaded async.

@IngwiePhoenix
IngwiePhoenix / stats.txt
Created December 28, 2015 23:51
Uniter-webpack
Hash: 23b1aa8e3e31f66d92f7
Version: webpack 1.12.9
Time: 1780ms
Asset Size Chunks Chunk Names
bundle.js 84.5 kB 0 [emitted] main
chunk {0} bundle.js (main) 225 kB [rendered]
> main [0] ./demo.php
[22] /Users/Ingwie/Work/~/util/support/isBufferBrowser.js 203 bytes {0} [built]
cjs require ./support/isBuffer [20] /Users/Ingwie/Work/~/util/util.js 526:19-48
[37] (webpack)/buildin/module.js 251 bytes {0} [built]
@IngwiePhoenix
IngwiePhoenix / example.md
Created January 2, 2016 00:54
Example markdown

This is heading 1

This is heading 2

This is heading 3

In the following, I will demonstrate some Markdown stuff.

I will assume a defacto default parser and transformer, so the following rules apply:

  • Full line-breaks need a <br> tag.
  • Opening a new paragraph requires two newlines (enter-enter)
module.exports = function Broker(broker) {
// Do your Broker setup...
}
@IngwiePhoenix
IngwiePhoenix / pars.c
Last active March 20, 2016 22:43
Paranthese counting
#include <stdio.h>
#include <string.h>
/**
* @author: Jan P. B.
* Purpose: Count parentheses in a string.
* Used to count capture groups for SLRE - and as string practice for Jan. :)
*
* @param {char*} c : Buffer
* @param {int} len : Buffer length
@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];
@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.

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 / .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