Skip to content

Instantly share code, notes, and snippets.

View RdeWilde's full-sized avatar

R. de Wilde RdeWilde

View GitHub Profile
.pretty-buttons(@color, @background, @text-shadow: none) {
color: @color;
#gradient > .vertical(lighten(@background, 5%), darken(@background, 5%), 0%, 100%);
border-color: darken(@background, 10%);
border-bottom-color: darken(@background, 20%);
text-shadow: @text-shadow;
.box-shadow(inset 0 1px 0 rgba(255, 255, 255, .1));
&:hover,
<?php
if (!$sContent = file_get_contents('http://www.biblija.net/biblija.cgi?m=lc1,1-10&id42=0&l=nl'))
throw new Exception('Tekst kon niet geladen worden');
// Try to get encoding right, lose the strange encoding chars
$sContent = mb_convert_encoding($sContent, 'UTF-8', mb_detect_encoding($sContent));
$sContent = mb_convert_encoding($sContent, 'html-entities', 'UTF-8');
$oDOM = new DOMDocument('1.0');
@RdeWilde
RdeWilde / MainActivity.java
Last active September 12, 2015 10:20 — forked from ManuelPeinado/MainActivity.java
Fading action bar effect using the new Toolbar class from the support library
package com.github.manuelpeinado.toolbartest;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.View;
package my;
public interface IModel {}
package my;
public interface IWriter
{
public IWriter add( ?????????? target);
}
name: myapp
dependencies:
redstone: any
redstone_mapper: any
redstone_mapper_mongo: any
@RdeWilde
RdeWilde / gist:cacee8b5965b91d1d28c2d9e7673d6f1
Created August 8, 2016 16:58 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@RdeWilde
RdeWilde / iondunder2gbbuilder.sh
Created August 23, 2016 20:44 — forked from IonomyGuy/iondunder2gbbuilder.sh
Ubuntu 14.04 Under 2 GB Ram iond builder
#!/bin/sh
cd ~
echo "### Installing Ionomy Daemon for under 1GB Ram"
echo "### Updating System"
apt-get update
echo "### Upgrading System"
apt-get upgrade
echo "### Modifying Swap"
dd if=/dev/zero of=/var/swap.img bs=1024k count=2000
mkswap /var/swap.img
{
"name": "PHP Notice",
"message": "Undefined index: rental_id",
"code": 8,
"type": "yii\\base\\ErrorException",
"file": "\/var\/www\/vhosts\/domain.tld\/subdomains\/dev\/httpdocs\/folder\/api\/vendor\/yiisoft\/yii2\/db\/ActiveRelationTrait.php",
"line": 459,
"stack-trace": [
"#0 \/var\/www\/vhosts\/domain.tld\/subdomains\/dev\/httpdocs\/folder\/api\/vendor\/yiisoft\/yii2\/db\/ActiveRelationTrait.php(459): yii\\base\\ErrorHandler->handleError(8, 'Undefined index...', '\/var\/www\/vhosts...', 459, Array)",
"#1 \/var\/www\/vhosts\/domain.tld\/subdomains\/dev\/httpdocs\/folder\/api\/vendor\/yiisoft\/yii2\/db\/ActiveRelationTrait.php(217): yii\\db\\ActiveQuery->filterByModels(Array)",
@RdeWilde
RdeWilde / README.md
Created October 30, 2016 11:46 — forked from sma/README.md
This is an ad-hoc Java-to-Dart translator written in three days. This is version 2 which some bug fixes.

Java to Dart

This is an ad-hoc Java-to-Dart translator originally written on two (admittedly long) evenings.

See http://sma.github.io/stuff/java2dartweb/java2dartweb.html for a demo.

Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt and StringBuffer.append). You will have to make changes to the resulting Dart code. It does not support anonymous inner classes.

However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.

@RdeWilde
RdeWilde / docker-compose.yml
Created October 9, 2017 20:04
Docker cluster for ION web application
version: '3'
services:
web:
image: nginx:latest
ports:
- "80:80"
- "3000:443"
restart: always
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"