Popular recipes by greg zakharov http://code.activestate.com/recipes/users/4184115/2013-10-23T15:55:05-07:00ActiveState Code RecipesAnalog clock (HTML)
2013-10-11T16:12:33-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578686-analog-clock/
<p style="color: grey">
HTML
recipe 578686
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/analog/">analog</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/svg/">svg</a>).
</p>
<p>Simplest analog clock (CSS, SVG, JavaScript).</p>
Calendar (HTML)
2013-10-23T15:55:05-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578695-calendar/
<p style="color: grey">
HTML
recipe 578695
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/calendar/">calendar</a>, <a href="/recipes/tags/javascript/">javascript</a>).
</p>
<p>Current month calendar. The smallest realization, I suppose.</p>
Directories tree (Bash)
2013-10-11T07:11:24-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578684-directories-tree/
<p style="color: grey">
Bash
recipe 578684
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/tree/">tree</a>).
</p>
<p>Imitation of tree -d command.</p>
Analog clock (Python)
2013-10-11T05:25:34-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578683-analog-clock/
<p style="color: grey">
Python
recipe 578683
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/analog/">analog</a>, <a href="/recipes/tags/clock/">clock</a>).
</p>
<p>Analog clock with Qt4</p>
Current month calendar (Batch)
2013-10-11T16:11:41-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578687-current-month-calendar/
<p style="color: grey">
Batch
recipe 578687
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/calendar/">calendar</a>).
</p>
<p>Prints calendar at current month.</p>
Analog clock (Ruby)
2013-10-11T05:23:49-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578682-analog-clock/
<p style="color: grey">
Ruby
recipe 578682
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/analog/">analog</a>, <a href="/recipes/tags/clock/">clock</a>).
</p>
<p>Analog clock with Qt4</p>
Unix head -n analog (Batch)
2013-10-12T17:40:06-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578688-unix-head-n-analog/
<p style="color: grey">
Batch
recipe 578688
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/head/">head</a>).
</p>
<p>Reads first N strings in text file. It looks like <a href="http://code.activestate.com/recipes/578311-unix-tail-n-analog/">tail -n</a></p>
Download file (Batch)
2013-10-10T16:31:50-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578680-download-file/
<p style="color: grey">
Batch
recipe 578680
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/download/">download</a>).
</p>
<p>Download file from internet without third party tools.</p>
Checking Gmail for new letters (Bash)
2013-10-11T08:11:38-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578685-checking-gmail-for-new-letters/
<p style="color: grey">
Bash
recipe 578685
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/gmail/">gmail</a>).
</p>
<p>Note: enter name of your email without "@gmail.com"</p>
String length (Batch)
2013-10-10T16:27:48-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578664-string-length/
<p style="color: grey">
Batch
recipe 578664
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/length/">length</a>, <a href="/recipes/tags/string/">string</a>).
Revision 2.
</p>
<p>A way for checking string length.</p>
Formating strings (print a table) (Batch)
2013-06-18T07:52:03-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578562-formating-strings-print-a-table/
<p style="color: grey">
Batch
recipe 578562
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/format/">format</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/table/">table</a>).
</p>
<p>As you know there are no escape characters such as "\t" in the windows command language but it does not mean that we can not format text. Command prompt has its own tricks. At firstly, you need declare enabledelayedexpansion after setlocal command in your batch file to get access for some interesting things; secondly, use <code><nul set /p "str=[string]"</code> construction which is equal print function in C language. OK, next batch file print multiplication table.</p>
Bash style commands (Bash)
2013-08-22T13:05:29-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578648-bash-style-commands/
<p style="color: grey">
Bash
recipe 578648
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/cmd/">cmd</a>).
</p>
<p>This is just a concept. To import bash style commands use "script.cmd /bash", to get the list of imported commands use "script.cmd /map"</p>
Search engine (Batch)
2013-10-10T16:18:09-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578646-search-engine/
<p style="color: grey">
Batch
recipe 578646
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/search/">search</a>).
Revision 2.
</p>
<p>Quick search on files index embedded directly in the command script. For example: "search.cmd exe$" - looks for all EXE files in index or just "search.cmd blahblahblah" - looks for all matches with "blahblahblah" in paths. To remove index from script use "search.cmd /fix:me" command (without quotes).</p>
Bash style commands (Batch)
2013-08-22T13:06:33-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578649-bash-style-commands/
<p style="color: grey">
Batch
recipe 578649
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/cmd/">cmd</a>).
</p>
<p>This is just a concept. To import bash style commands use "script.cmd /bash", to get the list of imported commands use "script.cmd /map"</p>
Canvas: static forms (JavaScript)
2013-08-08T13:34:41-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578626-canvas-static-forms/
<p style="color: grey">
JavaScript
recipe 578626
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/canvas/">canvas</a>).
Revision 2.
</p>
<p>Drawing static forms with canvas.</p>
Split string sample (Batch)
2013-08-13T11:29:44-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578638-split-string-sample/
<p style="color: grey">
Batch
recipe 578638
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/string/">string</a>).
</p>
<p>Target: we have a task to split the string ("this is a string") on the characters. Possible solution:</p>
Mounted devices2 (Batch)
2013-08-19T08:46:54-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578645-mounted-devices2/
<p style="color: grey">
Batch
recipe 578645
by <a href="/recipes/users/4184115/">greg zakharov</a>
.
</p>
<p>Another way to check mounted drives (this method has a bug with cdrom).</p>
Mounted devices (Batch)
2013-08-13T14:32:51-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578639-mounted-devices/
<p style="color: grey">
Batch
recipe 578639
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/mount/">mount</a>).
Revision 2.
</p>
<p>Script reads data stored in HKLM\SYSTEM\MountedDevices key and shows it in user friendly format. It's still under development.</p>
Jump (Batch)
2013-08-08T09:18:31-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578627-jump/
<p style="color: grey">
Batch
recipe 578627
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/dirjump/">dirjump</a>, <a href="/recipes/tags/jscript/">jscript</a>, <a href="/recipes/tags/regjump/">regjump</a>).
</p>
<p>How does it work? Just input registry key or folder path after script name. Note that script works well on WinXP and has not been tested on higher Win systems. Also you should know that if regedit has been launched then when you trying access another key it always starts with another window of regedit. Explorer has the same behaviour with this script. You can jump to HKCR, HKCU and HKLM branches but if you need more, please edit script manually :) For folders jump you should input full or relative path. For example: jump \doc or jump . or jump E:\fotos</p>
Center (HTML)
2013-07-14T16:16:09-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578603-center/
<p style="color: grey">
HTML
recipe 578603
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/center/">center</a>).
</p>
<p>Place element to center in the document.</p>