sortini (week #20)
This is a simple utility that sorts .INI files. It can sort sections and entries ascending or descending. It also maintains comment positioning within the file too!
Check out the source code at GitHub!
This is a simple utility that sorts .INI files. It can sort sections and entries ascending or descending. It also maintains comment positioning within the file too!
Check out the source code at GitHub!
Simple utility that will copy newer and/or missing files from the source folder to the destination folder.
Please note that openssl is required! These two batch files just wrap it.
Check out the source code on GitHub!
> encrypt /?
o
8
.oPYo. odYo. .oPYo. oPYo. o o .oPYo. o8P
8oooo8 8' '8 8 ' 8 '' 8 8 8 8 8
8. 8 8 8 . 8 8 8 8 8 8
'Yooo' 8 8 'YooP' 8 'YooP8 8YooP' 8
:::.....:..::..:.....:..:::::....8 8 ....:::..:::
::::::::::::::::::::::::::::::ooP'.8 ::::::::::::
::::::::::::::::::::::::::::::...::..::::::::::::
simple wrapper using openssl to encrypt files
batch file created by wasatchwizard
USAGE:
$ encrypt file
Performs in-place encryption of 'file'.
WARNING: This overwrites existing file!
$ encrypt infile outfile
Encrypts 'infile' and saves to 'outfile'.
> decrypt /?
8 o
8 8
.oPYo8 .oPYo. .oPYo. oPYo. o o .oPYo. o8P
8 8 8oooo8 8 ' 8 '' 8 8 8 8 8
8 8 8. 8 . 8 8 8 8 8 8
'YooP' 'Yooo' 'YooP' 8 'YooP8 8YooP' 8
:::.....::.....::.....:..:::::....8 8 ....:::..:::
:::::::::::::::::::::::::::::::ooP'.8 ::::::::::::
:::::::::::::::::::::::::::::::...::..::::::::::::
simple wrapper using openssl to decrypt files
batch file created by wasatchwizard
USAGE:
$ decrypt file
Performs in-place decryption of 'file'.
WARNING: This overwrites existing file!
$ decrypt infile outfile
Decrypts 'infile' and saves to 'outfile'.
This simple utility displays the file averages, counts, and sizes - provides a nice summary of the files sizes in the current directory (and sub-directories).
Check out the source code on GitHub!
Creates output like the following:
┌────────────────────────────────────────────────────────────────────────────┐
│ facs.exe - displays file averages, counts, and sizes for the current │
│ directory and all sub-directories. │
│ │
│ Directory: C:\ExamplePath │
├────────────┬────────────┬────────────┬──────────────────┬──────────────────┤
│ from kb │ to kb │ num files │ total kb │ average kb │
├────────────┼────────────┼────────────┼──────────────────┼──────────────────┤
│ 0 │ 1 │ 1,599 │ 612.52 │ 0.38 │
│ 1 │ 2 │ 815 │ 1,180.66 │ 1.45 │
│ 2 │ 4 │ 952 │ 2,700.11 │ 2.84 │
│ 4 │ 8 │ 917 │ 5,200.96 │ 5.67 │
│ 8 │ 16 │ 926 │ 10,748.68 │ 11.61 │
│ 16 │ 32 │ 929 │ 21,000.26 │ 22.60 │
│ 32 │ 64 │ 534 │ 23,428.11 │ 43.87 │
│ 64 │ 128 │ 409 │ 37,028.81 │ 90.53 │
│ 128 │ 256 │ 290 │ 51,613.45 │ 177.98 │
│ 256 │ 512 │ 191 │ 69,727.30 │ 365.06 │
│ 512 │ 1,024 │ 116 │ 82,273.15 │ 709.25 │
│ 1,024 │ 4,096 │ 70 │ 129,267.68 │ 1,846.68 │
│ 4,096 │ 8,192 │ 7 │ 41,408.85 │ 5,915.55 │
│ 8,192 │ 16,384 │ 2 │ 22,227.86 │ 11,113.93 │
│ 16,384 │ 32,768 │ │ │ │
│ 32,768 │ 65,536 │ │ │ │
│ 65,536 │ 131,072 │ │ │ │
│ 131,072 │ 262,144 │ │ │ │
│ 262,144 │ 524,288 │ │ │ │
│ 524,288 │ 1,048,576 │ │ │ │
│ 1,048,576 │ and up │ │ │ │
├────────────┴────────────┼────────────┼──────────────────┼──────────────────┤
│ totals │ 7,757 │ 498,418.40 │ 64.25 │
└─────────────────────────┴────────────┴──────────────────┴──────────────────┘
A simple DOS/CLI utility that resizes and relocates the current command prompt window to various locations on the screen based on the specified arguments (or whatever is saved in its config).
Check out the source code on GitHub!
USAGE:
reloc.exe [--config][--clear] direction
Supported Directions:
7|tl 8|up|top 9|tr
▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄
██████ █ █████████████ █ ██████
██████ █ █████████████ █ ██████
█ █ █ █ █ █
█ █ █ █ █ █
█ █ █ █ █ █
▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀
4|left|west 5|center 6|right|east
▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄
██████ █ █ █ █ ██████
██████ █ █ ▄▄▄▄▄ █ █ ██████
██████ █ █ █████ █ █ ██████
██████ █ █ ▀▀▀▀▀ █ █ ██████
██████ █ █ █ █ ██████
▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀
1|bl 2|down|bottom 3|br
▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄
█ █ █ █ █ █
█ █ █ █ █ █
█ █ █ █ █ █
██████ █ █████████████ █ ██████
██████ █ █████████████ █ ██████
▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀
10|max|x
▄▄▄▄▄▄▄▄▄▄▄▄▄
█████████████
█████████████
█████████████
█████████████
█████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀
--clear » Clears the values in config.
--config » When used with direction, the direction saved to config.
When used by itself, the config values are displayed.
» The position of the `--config` option does not matter
in relation to the direction.
EXAMPLES:
> reloc max » Maximizes the console window.
> reloc 10 » Maximizes the console window.
> reloc up » Resizes the console and positions at the top of the
screen.
> reloc br » Resizes the console and positions at the bottom right
corner of the screen.
> reloc --config » Displays current config values.
> reloc l » Relocates to the left edge and saves to config.
SAVED CONFIG:
direction = BottomLeft
Outputs colored text to the console.
Check out the source code on GitHub!
USAGE:
-s color Apply the color to the console. (not just the text being
output.)
{color} The color to use. Use the color value (number) or name of
the color (case in-sensitive).
All text following the color will be displayed in that
color.
/? display help.
/? examples display examples.
/? colors display colors.
» display environment variables
A simple DOS command-line (CLI) utility displays the environment variables in a nicely formatted list.
Check out the source code on GitHub!
------------------------- All Environment Variables -------------------------
__DOSKEY_HISTORYFILE = C:\Users\Kody\.doskey_history
__DOSKEY_MACROFILE = C:\Users\Kody\.doskey_macros
ALLUSERSPROFILE = C:\ProgramData
AMDAPPSDKROOT = C:\Program Files (x86)\AMD APP\
...
A simple DOS command-line (CLI) utility that displays all of the ascii characters.
Check out the source code on GitHub!
C:\>ascii.exe
000 001 ☺ 002 ☻ 003 ♥ 004 ♦ 005 ♣ 006 ♠ 007 008
009 010 011 ♂ 012 ♀ 013 014 ♫ 015 ☼ 016 ► 017 ◄
018 ↕ 019 ‼ 020 ¶ 021 § 022 ▬ 023 ↨ 024 ↑ 025 ↓ 026 →
027 ← 028 ∟ 029 ↔ 030 ▲ 031 ▼ 032 033 ! 034 " 035 #
036 $ 037 % 038 & 039 ' 040 ( 041 ) 042 * 043 + 044 ,
045 - 046 . 047 / 048 0 049 1 050 2 051 3 052 4 053 5
054 6 055 7 056 8 057 9 058 : 059 ; 060 < 061 = 062 >
063 ? 064 @ 065 A 066 B 067 C 068 D 069 E 070 F 071 G
072 H 073 I 074 J 075 K 076 L 077 M 078 N 079 O 080 P
081 Q 082 R 083 S 084 T 085 U 086 V 087 W 088 X 089 Y
090 Z 091 [ 092 \ 093 ] 094 ^ 095 _ 096 ` 097 a 098 b
099 c 100 d 101 e 102 f 103 g 104 h 105 i 106 j 107 k
108 l 109 m 110 n 111 o 112 p 113 q 114 r 115 s 116 t
117 u 118 v 119 w 120 x 121 y 122 z 123 { 124 | 125 }
126 ~ 127 ⌂ 128 Ç 129 ü 130 é 131 â 132 ä 133 à 134 å
135 ç 136 ê 137 ë 138 è 139 ï 140 î 141 ì 142 Ä 143 Å
144 É 145 æ 146 Æ 147 ô 148 ö 149 ò 150 û 151 ù 152 ÿ
153 Ö 154 Ü 155 ¢ 156 £ 157 ¥ 158 ₧ 159 ƒ 160 á 161 í
162 ó 163 ú 164 ñ 165 Ñ 166 ª 167 º 168 ¿ 169 ⌐ 170 ¬
171 ½ 172 ¼ 173 ¡ 174 « 175 » 176 ░ 177 ▒ 178 ▓ 179 │
180 ┤ 181 ╡ 182 ╢ 183 ╖ 184 ╕ 185 ╣ 186 ║ 187 ╗ 188 ╝
189 ╜ 190 ╛ 191 ┐ 192 └ 193 ┴ 194 ┬ 195 ├ 196 ─ 197 ┼
198 ╞ 199 ╟ 200 ╚ 201 ╔ 202 ╩ 203 ╦ 204 ╠ 205 ═ 206 ╬
207 ╧ 208 ╨ 209 ╤ 210 ╥ 211 ╙ 212 ╘ 213 ╒ 214 ╓ 215 ╫
216 ╪ 217 ┘ 218 ┌ 219 █ 220 ▄ 221 ▌ 222 ▐ 223 ▀ 224 α
225 ß 226 Γ 227 π 228 Σ 229 σ 230 µ 231 τ 232 Φ 233 Θ
234 Ω 235 δ 236 ∞ 237 φ 238 ε 239 ∩ 240 ≡ 241 ± 242 ≥
243 ≤ 244 ⌠ 245 ⌡ 246 ÷ 247 ≈ 248 ° 249 ∙ 250 · 251 √
252 ⁿ 253 ² 254 ■
» center the console window
A simple DOS/CLI utility that centers the current command prompt window. It is very similar to shrink and enlarge.
Check out the source code on GitHub!
GitVersion.dll is a basic MSBuild extension for versioning assemblies, based on the Git revision count. See the source code for more details about that.
The git.exe binary is required for this to work. And, the MSBuild Community Tasks is also required for some of this to work.
In order to use this extension, add the following to your .csproj files and reload your project:
<PropertyGroup Label="Versioning">
<VersioningMajor>0</VersioningMajor>
<VersioningMinor>9</VersioningMinor>
<CommitVersion>N/A</CommitVersion>
</PropertyGroup>
<PropertyGroup>
<GitBinPath>C:\YourPath\Git\bin</GitBinPath>
</PropertyGroup>
<UsingTask TaskName="GitVersion" AssemblyFile="C:\YourPath\GitVersion.dll" />
<Target Name="BeforeBuild">
<GitVersion GitBinPath="$(GitBinPath)" CurrentPath="$(MSBuildProjectDirectory)">
<Output TaskParameter="CommitVersion" PropertyName="CommitVersion" />
<Output TaskParameter="CommitCount" PropertyName="CommitCount" />
</GitVersion>
<Time Format="yyMMdd">
<Output TaskParameter="FormattedTime" PropertyName="BuildDate" />
<Output TaskParameter="Year" PropertyName="Year" />
</Time>
<AssemblyInfo
CodeLanguage="CS"
OutputFile="Properties\AssemblyInfo.cs"
AssemblyTitle="appName ver:$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)"
AssemblyDescription="appName"
AssemblyCompany="Company Name"
AssemblyProduct="appName"
AssemblyCopyright="Copyright (C) 2003-$(Year) Author's Name."
ComVisible="false"
CLSCompliant="false"
Guid="11111111-2222-3333-4444-555555555555"
AssemblyVersion="$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)"
AssemblyFileVersion="$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)" />
<Message Text="$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)" />
</Target>
Please note that this will overwrite your AssemblyInfo.cs file!
Check out the source code on GitHub!
A simple DOS command-line (CLI) utility that enlarges the command prompt window to the largest possible size (based on the current/active screen). Just like shrink, this is a super simple utility and hardly any code, but I use it frequently every day!
Check out the source code on GitHub!
A simple DOS command-line (CLI) utility that shrinks the current command prompt window to 80x24. And, that's all it does! It is a super simple utility and hardly any code, but I'm always surprised just how often I use it!
I checked it into GitHub a while back, but forgot to make the entry into my blog.. oh well. Here it is now.
Check out the source code on GitHub!
Cleans and sorts a descript.ion file, removing entries that no longer exist with a couple of other options too..
Check out the source code on GitHub!
USAGE:
cldesc.exe [options] [file]
--vf Remove entries where the entry does not exist.*
--sf Save a backup copy of the `descript.ion` file.*
--oc Output to the console instead of to the source file. This only
works when a <file> is specified.
* These items can be set as environment variables using:
> set cldescrip_<arg>=true|false
[file] Specify the file to clean up. If a file is not specified, assumes
`descript.ion` in the current directory.
A file (or content) can be piped to `cldesc` via stdin. In such
cases the output will always be sent to stdout.
EXAMPLES:
Sort the `descript.ion` file in the current directory, updating the file's
contents.
> cldesc.exe
Sort `file.txt` and output the results to the console.
> type file.txt |cldesc
This is a simple utility that converts .md (markdown) files to html. It then combines them into one .html file.
The real benefit of this is that I can separate my book into separate files. As many or as few as I want. I currently have split up my little book into chapters and sub-sections; one file each.
This little utility will only convert md files that have changed, into html. Once all html files are up to date, they are combined into a single file and wrapped inside the template.
It supports a settings file (_ebook_config.txt) and a html template file (_ebook_template.txt).
_ebook_config.txt
title=My book title
ext=*.md
The template file is really just an html file. Use @SPLIT@ to indicate in the template where the book contents will be. See the examples folder in the code for details.
This is not a markdown to html compiler: It relies upon markdown.pl (a Perl script) available from daring fireball for the actual conversion.
Check out the source code on GitHub!
It is definitely a work in progress, but it does what I need for the book I'm working on. And, it is 100 times faster than editing a single md file and converting the whole thing every time.
» Displays an interactive Git status on the command-line.
Check out the source code and downloads on GitHub!
This is a simple application that allows you to get the status of your Git directory interactively. What I mean by interactively is you can diff files* and mark files for adding right from the command-line.
*In order to diff files you must create a Git alias named 'difftool' that opens/launches an external application to perform the diff. If the alias does not open a different tool (something other than the built in 'diff' command, it will be ignored and lock-up the gitstatus application.
Currently, it only works on modified files. It won't let you add files that are not already part of the repository. I only felt that this utility was needed when modifying files, etc. Let me know, if you would like it extended or fork it yourself!
Yes, it is very quick and dirty. However, it works nicely for what it was made for!
gitstatus is released using the MIT License, see LICENSE.txt for details.
