Skip to content

Instantly share code, notes, and snippets.

View mapfel's full-sized avatar

Marko Apfel mapfel

View GitHub Profile
@mapfel
mapfel / ArraySlicing1.rb
Last active December 16, 2015 06:09
Ruby - day 2: paging array content in slices of four
a = (1..16).to_a
a.each {|i| i % 4 == 0 ? (puts i) : (print i, ", ")}
@mapfel
mapfel / .gitconfig
Last active December 11, 2020 13:27
Git configurations
[core]
autocrlf = True
# whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
# https://help.github.com/en/articles/associating-text-editors-with-git
editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin
[color]
ui = auto
@mapfel
mapfel / gist:1451648
Created December 9, 2011 14:05
Batchprogrammierung: Prüfen ob Verzeichnis da ist und wenn nicht anlegen
IF NOT EXIST Content MKDIR Content
@mapfel
mapfel / gist:1451537
Created December 9, 2011 13:33
Batchprogrammierung: Parameter verwenden
IF "%1" == "" (SET Configuration=Debug) ELSE (SET Configuration=%1)
ECHO Configuration=%Configuration%
@mapfel
mapfel / gist:1451481
Created December 9, 2011 13:18
Batchprogrammierung: Ja/Nein-Abfrage
ECHO Rekursiv alle Ordnerinhalte unterhalb des Content-Ordner loeschen?
SET /P X= (J)a oder (N)ein?
IF /I "%X%"=="J" GOTO :LabelDelete
GOTO :LabelCollect
:LabelDelete
ECHO OFF
DEL /S /Q *.*>NUL
ECHO Dateien geloescht.
GOTO :LabelCollect