This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF "%1" == "" (SET Configuration=Debug) ELSE (SET Configuration=%1) | |
ECHO Configuration=%Configuration% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF NOT EXIST Content MKDIR Content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = (1..16).to_a | |
a.each {|i| i % 4 == 0 ? (puts i) : (print i, ", ")} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
counter = 1 | |
file = File.new($0, "r") | |
while (line = file.gets) | |
if line.include?("line") | |
puts "#{counter}: #{line}" | |
end | |
counter += 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1 = ["a", 1, "b", 2] | |
h1 = Hash[*a1] | |
puts "a1=" + a1.to_s | |
puts "h1=" + h1.to_s | |
a2 = [["a", 1], ["b", 2]] | |
h2 = Hash[*a1] #splat operator (*) used | |
puts "a2=" + a2.to_s | |
puts "h2=" + h2.to_s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domains = { :de => "DEU", :no => "NOR", :us => "US" } | |
domains.each_pair { |k, v| puts "Key: #{k}, Value: #{v}" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZSH_THEME_GIT_PROMPT_PREFIX="[git:" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color" | |
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+" | |
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]" | |
function git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=UTF-8 | |
import math, subprocess | |
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
output = p.communicate()[0] | |
o_max = [l for l in output.splitlines() if 'MaxCapacity' in l][0] | |
o_cur = [l for l in output.splitlines() if 'CurrentCapacity' in l][0] |
OlderNewer