Skip to content

Instantly share code, notes, and snippets.

@RobinMalfait
RobinMalfait / siaf.js
Last active Dec 14, 2015
JavaScript: self invoking anonymous function
View siaf.js
/**
*
* Self-Invoking Anonymous Function
*
**/
(function(){
})();
@RobinMalfait
RobinMalfait / standard.html
Last active Dec 14, 2015
HTML: Starting Template
View standard.html
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
View JavaScript: detect_ie.js
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 Feb 25, 2013
PASCAL: Standard Template
View template.pas
Program program_name;
Uses
crt;
CONST
intBackground = 1; // Background Color
intText = 15; // Text Color
Begin
@RobinMalfait
RobinMalfait / sublime.bat
Last active Dec 14, 2015
BAT: Start Sublime Using Batch File
View sublime.bat
@echo off
echo "STARTING: Sublime Text 2..."
start "Sublime Text 2" "%ProgramFiles%\Sublime Text 2\sublime_text.exe"
exit
View class.php
<?php
class Name{
function __construct(){
return true;
}
}
@RobinMalfait
RobinMalfait / standard.java
Created Mar 4, 2013
JAVA: standard template
View standard.java
import java.applet.Applet;
import java.awt.*;
public class standard extends Applet {
public void init()
{
resize(500, 500);
@RobinMalfait
RobinMalfait / reset.css
Created Mar 20, 2013
CSS: Eric Meyer's reset
View reset.css
/* 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,
View Super Simple Ajax File Upload (XHR2).js
// 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
JAVA: standaard voor beweging
View beweging.java
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;