Skip to content

Instantly share code, notes, and snippets.

View rotespferd's full-sized avatar
👨‍🍳

Marian Hahne rotespferd

👨‍🍳
View GitHub Profile
import java.util.Random;
public class Dice {
//Number of sides of the dice
private int sides;
//First number of the dice
private int firstNumber;
@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
@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 / 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 / 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 / Smyck.xml
Created February 24, 2013 16:56
The smyck-color-theme for all JetBrains-Editors.
<scheme name="Smyck" parent_scheme="Default" version="1">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="CONSOLE_BACKGROUND_KEY" value="1B1B1B" />
<option name="INDENT_GUIDE" value="444a50" />
<option name="SELECTION_BACKGROUND" value="1c5665" />
<option name="CARET_ROW_COLOR" value="323232" />
<option name="WHITESPACES" value="444a50" />
@rotespferd
rotespferd / xcf2png
Created May 10, 2013 21:18
Converts all images in a directory from .xcf to .png.
#!/usr/local/bin/node
var fs = require('fs');
var sys = require('sys');
var exec = require('child_process').exec;
console.log("Start converting");
var command = "convert -flatten ";
@rotespferd
rotespferd / install-phalcon.sh
Created October 25, 2013 16:01
Installs the PHP framework Phalcon on Ubuntu.
#!/bin/sh
# install script for PHP framework Phalcon
# for more info see http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac
echo "-------------------"
echo "Install Phalcon PHP"
echo "-------------------"
# installation prerequirements
@rotespferd
rotespferd / install.sh
Last active August 29, 2015 13:56
Installation of a bootstrap TYPO3-project.
#!/bin/sh
echo "=================================="
echo "Welcome to TYPO3 project-bootstrapping."
echo "=================================="
mkdir cms
echo "Clone TYPO3 repositry"
git clone https://github.com/TYPO3/TYPO3.CMS.git typo3_src
@rotespferd
rotespferd / .gitignore
Created January 22, 2015 15:25
TYPO3.gitignore
.DS_Store
## TYPO3 v4
# Ignore serveral upload and file directories.
/fileadmin/user_upload/
/fileadmin/_temp_/
/uploads/
# Ignore cache
/typo3conf/temp_CACHED*
/typo3conf/temp_fieldInfo.php
# Ignore local config which overrides typo3 config.