Skip to content

Instantly share code, notes, and snippets.

View whazor's full-sized avatar

Nanne whazor

  • 07:43 (UTC +02:00)
View GitHub Profile
ewrwerwreewr
@whazor
whazor / scala.rb
Last active December 10, 2015 07:48
forked and updated to RC5
# to install the latest stable version:
brew install scala --with-docs
# to install scala-2.10.0-RC5:
brew install https://raw.github.com/gist/4403133/scala.rb --with-docs
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands):
brew switch scala 2.9.2
brew switch scala 2.10.0-RC5
@whazor
whazor / index.html
Created January 5, 2012 22:44
MySQL user generator
<!doctype html>
<html>
<head>
<title>mySQL user generator</title>
<style>
body, html {
background-color: #E3E3E3;
font: normal normal normal 1em Arial, sans-serif;
}
label {
@whazor
whazor / gist:1555118
Created January 3, 2012 14:36
Filelock
<?php
$file = dirname( __FILE__ ).'/lock.txt';
$lock = file_exists($file);
if($lock) $lock = file_get_contents($file);
if($lock && $lock != 'unlocked' && ((time() - $lock) < 120))
die('Het scriptje is al bezig! Wacht '.(120 - (time() - $lock)).'s.');
else file_put_contents($file, time());
echo 'ZWARE OPERATIE';