Skip to content

Instantly share code, notes, and snippets.

View rotespferd's full-sized avatar
👨‍🍳

Marian Hahne rotespferd

👨‍🍳
View GitHub Profile
@rotespferd
rotespferd / grunt.js
Created November 24, 2012 15:56
A basic template gruntconfig file for grunt.js
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
@rotespferd
rotespferd / gist:3829785
Created October 3, 2012 20:56
Instant http-server.
#!/usr/local/bin/node
var http = require('http'),
url = require('url'),
fs = require('fs'),
mime = require('mime');
base = __dirname;
http.createServer(function (req, res) {
var timer = new Date();
@rotespferd
rotespferd / gist:3755496
Created September 20, 2012 12:01
Get data out of a CSV-file.
function getCSVData($file)
{
$content = array();
$columNames = array();
$row = 0;
$handle = fopen($file, "r");
while (($data = fgetcsv($handle, 100000, CSVLIMITER, '"')) !== false) {
$row++;
@rotespferd
rotespferd / .vimrc
Created July 10, 2012 21:57
My .vimrc
" use hukl's dotfiles
" use http://www.vim.org/scripts/script.php?script_id=2754
set nocompatible
" Initialize Pathogen
call pathogen#infect()
" Enable syntax highlighting
syntax on
import java.util.Random;
public class Dice {
//Number of sides of the dice
private int sides;
//First number of the dice
private int firstNumber;