Skip to content

Instantly share code, notes, and snippets.

@RobinMalfait
RobinMalfait / siaf.js
Last active July 7, 2023 12:35
JavaScript: self invoking anonymous function
/**
*
* Self-Invoking Anonymous Function
*
**/
(function(){
})();
@RobinMalfait
RobinMalfait / standard.html
Last active December 14, 2015 04:59
HTML: Starting Template
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
@RobinMalfait
RobinMalfait / JavaScript: detect_ie.js
Last active December 14, 2015 04:59
JavaScript: Detect IE
var ie = (function(v,undef){
var div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
@RobinMalfait
RobinMalfait / template.pas
Created February 25, 2013 22:17
PASCAL: Standard Template
Program program_name;
Uses
crt;
CONST
intBackground = 1; // Background Color
intText = 15; // Text Color
Begin
@RobinMalfait
RobinMalfait / sublime.bat
Last active December 14, 2015 05:40
BAT: Start Sublime Using Batch File
@echo off
echo "STARTING: Sublime Text 2..."
start "Sublime Text 2" "%ProgramFiles%\Sublime Text 2\sublime_text.exe"
exit
@RobinMalfait
RobinMalfait / class.php
Last active December 14, 2015 05:40
PHP: Class
<?php
class Name{
function __construct(){
return true;
}
}
@RobinMalfait
RobinMalfait / standard.java
Created March 4, 2013 09:57
JAVA: standard template
import java.applet.Applet;
import java.awt.*;
public class standard extends Applet {
public void init()
{
resize(500, 500);
@RobinMalfait
RobinMalfait / reset.css
Created March 20, 2013 18:27
CSS: Eric Meyer's reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
// Ajax File upload with jQuery and XHR2
// Sean Clark http://square-bracket.com
// xhr2 file upload
// data is optional
$.fn.upload = function(remote,data,successFn,progressFn) {
// if we dont have post data, move it along
if(typeof data != "object") {
progressFn = successFn;
successFn = data;
@RobinMalfait
RobinMalfait / beweging.java
Created May 13, 2013 08:48
JAVA: standaard voor beweging
import java.applet.*;
import java.awt.*;
import java.awt.Color;
import java.awt.Graphics;
public class class_name extends Applet implements Runnable{
Thread animator;
Integer frame, delay;