Skip to content

Instantly share code, notes, and snippets.

View mjaschen's full-sized avatar
😏
What's happening?

Marcus Jaschen mjaschen

😏
What's happening?
View GitHub Profile
@mjaschen
mjaschen / gist:1576311
Created January 7, 2012 22:37
XHTML to BBCode
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" />
<xsl:template match="a"> [url=<xsl:value-of select="@href" />]<xsl:apply-templates />[/url] </xsl:template>
<xsl:template match="img"> [img]<xsl:value-of select="@src" />[/img] </xsl:template>
<xsl:template match="b|strong"> [b]<xsl:apply-templates />[/b] </xsl:template>
<xsl:template match="i|em"> [i]<xsl:apply-templates />[/i] </xsl:template>
<xsl:template match="text()"><xsl:value-of select="normalize-space(.)"/></xsl:template>
<xsl:template match="ol"> [list=1]<xsl:apply-templates />[/list] </xsl:template>
<xsl:template match="ul"> [list]<xsl:apply-templates />[/list] </xsl:template>
<?php
do {
$iterations ++;
// hier geschehen diverse Arbeitsschritte
} while ($countCurrent < $countDesired
|| $iterations >= 5);
<?php
do {
$iterations ++;
// hier geschehen diverse Arbeitsschritte
} while ($countCurrent < $countDesired
|| $iterations < 5);
<?php
do {
$iterations ++;
if ($iterations >= 5) {
break;
}
// hier geschehen diverse Arbeitsschritte
### Keybase proof
I hereby claim:
* I am mjaschen on github.
* I am mjaschen (https://keybase.io/mjaschen) on keybase.
* I have a public key whose fingerprint is B31F 6F5C 4325 7902 3362 64D0 FCA7 A6C1 CE13 FDF2
To claim this, I am signing this object:
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# 4 space indentation
[*.php]
<?php
require_once __DIR__ . "/vendor/autoload.php";
use Location\Coordinate;
use Location\Distance\Vincenty;
$coordinate1 = new Coordinate(19.820664, -155.468066); // Mauna Kea Summit
$coordinate2 = new Coordinate(20.709722, -156.253333); // Haleakala Summit
@mjaschen
mjaschen / uci.html
Created August 22, 2016 09:01
UCI Stripes with CSS Gradients
<html>
<head>
<style>
html, body {
padding: 0;
margin: 0;
}
/* http://colorzilla.com/gradient-editor/#1e76bd+0,1e76bd+20,c7203c+20,c7203c+40,000000+40,000000+60,f8df00+60,f8df00+80,35b24a+80,35b24a+100 */
.uci-stripes {
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
@mjaschen
mjaschen / README.md
Created May 15, 2019 14:00 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8