Skip to content

Instantly share code, notes, and snippets.

View RouL's full-sized avatar

Markus Zhang RouL

  • Deutscher Paritätischer Wohlfahrtsverband Landesverband NRW
  • Gevelsberg
View GitHub Profile
@RouL
RouL / host_based_tld_length.rb
Created June 21, 2017 13:11 — forked from toolmantim/host_based_tld_length.rb
Reconfigures Rails ActionDispatch's TLD handling dynamically based on the request host, so you don't have to mess with config.action_dispatch.tld_length for cross-device testing using xip.io and friends
# Reconfigures ActionDispatch's TLD handling dynamically based on the request
# host, so you don't have to mess with config.action_dispatch.tld_length for
# cross-device testing using xip.io and friends
#
# Examples:
# use Rack::HostBasedTldLength, /xip\.io/, 5
class Rack::HostBasedTldLength
def initialize(app, host_pattern, host_tld_length)
@app = app
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/3rdParty/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/3rdParty/ckeditor/adapters/jquery.js"></script>
{event name='additionalIncludes'}
<script type="text/javascript">
//<![CDATA[
$(function() {
var config = {
extraPlugins: 'bbcode',
language: '{@$__wcf->language->getFixedLanguageCode()}',
@RouL
RouL / WCF.js
Created January 13, 2012 19:58
/**
* Class and function collection for WCF
*
* @author Markus Bartz, Tim Düsterhus, Alexander Ebert
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
(function() {
// store original implementation
#include<stdio.h>
int main(int argc, char* argv[]) {
if (argc > 1) {
FILE* fptr = fopen(argv[1], "r");
int number = 0;
int i;
fscanf(fptr, "%i", &number);
fclose(fptr);
/**
* @author Markus Bartz
* @copyright 2011 Markus Bartz
* @license GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl.html>
*
* Parts of the logic are borrowed by "lib/system/template/plugin/TemplatePluginFunctionPages.class.php"
* from the WoltLab® Community Framework™ which is licensed under the GNU Lesser General Public License.
*/
var Pagination = Class.create({
// some "static" variables