Skip to content

Instantly share code, notes, and snippets.

View BrainFeeder's full-sized avatar

Robrecht Wellens BrainFeeder

View GitHub Profile
@BrainFeeder
BrainFeeder / dymoLabel.xml
Last active March 22, 2017 09:39
Example DYMO address label for use with the SDK
<?xml version="1.0" encoding="utf-8"?>
<DieCutLabel Version="8.0" Units="twips">
<PaperOrientation>Landscape</PaperOrientation>
<Id>Address</Id>
<PaperName>30252 Address</PaperName>
<DrawCommands>
<RoundRectangle X="0" Y="0" Width="1581" Height="5040" Rx="270" Ry="270" />
</DrawCommands>
<ObjectInfo>
<AddressObject>
@BrainFeeder
BrainFeeder / class.floodblocker.php
Created March 22, 2017 11:57
Class allowing to protect the scripts from flooding and to prevent automatic download of the site from single IP
<?php
// ----------------------------------------------------------------------------
//
// class.floodblocker.php - FloodBlocker class, ver.0.01 (April 15, 2005)
//
// Description:
// Class allowing to protect the scripts from flooding and to prevent
// automatic download of the site from single IP.
//
@BrainFeeder
BrainFeeder / fileInput.html
Last active March 22, 2017 15:28
Way to use input[type=file] with Bootstrap
<html>
<head>
<!-- original author: Cory LaViska (@SEE https://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3) -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.btn-file {
position: relative;
@BrainFeeder
BrainFeeder / httpd-vhosts.conf
Created March 31, 2017 09:17
Apache Virtual host example
Virtual host servername
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
@BrainFeeder
BrainFeeder / index.php
Created December 21, 2017 12:18 — forked from facultymatt/index.php
Codeigniter subdomain routing index file. Support for admin dashboard.
<?php
date_default_timezone_set('America/New_York');
/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*
* You can load different configurations depending on your
@BrainFeeder
BrainFeeder / server.php
Last active March 29, 2018 13:39
Setting up websockets with Ratchet and React in php (TLS/WSS)
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
$pusher = new Pusher; // Create a Pusher class that implements Ratchet\Wamp\WampServerInterface
// The loop
// Binding to 127.0.0.1 means the only client that can connect is itself.
// To accept remotes we should bind to 0.0.0.0