Popular recipes tagged "javascript" but not "macro"http://code.activestate.com/recipes/tags/javascript-macro/2016-08-07T20:41:12-07:00ActiveState Code RecipesMakes html with javascript to animate a sequence of images (Python)
2016-08-07T20:41:12-07:00Brian Fiedlerhttp://code.activestate.com/recipes/users/4194196/http://code.activestate.com/recipes/580675-makes-html-with-javascript-to-animate-a-sequence-o/
<p style="color: grey">
Python
recipe 580675
by <a href="/recipes/users/4194196/">Brian Fiedler</a>
(<a href="/recipes/tags/animation/">animation</a>, <a href="/recipes/tags/javascript/">javascript</a>).
Revision 2.
</p>
<p>Given paths to image files, produces the html file with embedded javascript to animate those images as a web page.</p>
JavaScript WebSocket client for Python + Go WebSocket-based system monitoring example (JavaScript)
2014-01-03T21:09:54-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/578806-javascript-websocket-client-for-python-go-websocke/
<p style="color: grey">
JavaScript
recipe 578806
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/golang/">golang</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/websockets/">websockets</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>This recipe is the JavaScript client side of an overall recipe that shows how to do system monitoring using WebSockets, Python, Go (using websocketd), and JavaScript + HTML. The server side of the recipe (in Python, and using websocketd which is written in Go), is here:</p>
<p><a href="http://code.activestate.com/recipes/578803-using-websocketd-with-python-for-web-based-system-/?in=user-4173351" rel="nofollow">http://code.activestate.com/recipes/578803-using-websocketd-with-python-for-web-based-system-/?in=user-4173351</a></p>
<p>The system monitoring example shows the system disk space info (total, used and free) using the Python psutil module.</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>
Verify html form with JavaScript (JavaScript)
2013-07-15T12:19:53-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578606-verify-html-form-with-javascript/
<p style="color: grey">
JavaScript
recipe 578606
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/form/">form</a>, <a href="/recipes/tags/javascript/">javascript</a>).
</p>
<p>I wrote this for a <a href="http://thelivingpearl.com/2013/07/15/the-guest-book-problem/">php Guest Book</a> app I wrote. </p>
Is enabled.. (cookie, javascript & java)? (JavaScript)
2013-03-19T11:23:28-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578495-is-enabled-cookie-javascript-java/
<p style="color: grey">
JavaScript
recipe 578495
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/cookie/">cookie</a>, <a href="/recipes/tags/java/">java</a>, <a href="/recipes/tags/javascript/">javascript</a>).
</p>
<p>I'm not sure that the following method is universal in all cases to detect is enabled or disabled cookie, javascript and java in user browser at current moment. This is just an example.</p>
WebSocket interface (Python)
2012-11-25T16:52:21-08:00Nick Farohttp://code.activestate.com/recipes/users/4184363/http://code.activestate.com/recipes/578348-websocket-interface/
<p style="color: grey">
Python
recipe 578348
by <a href="/recipes/users/4184363/">Nick Faro</a>
(<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/socket/">socket</a>, <a href="/recipes/tags/websocket/">websocket</a>).
Revision 2.
</p>
<p>This tries its best to be a replacement for the regular <code>socket</code> module.</p>
<p>It supports only sending and receiving but should be useful enough.</p>
<p>The only real difference should be that you can't specify the number of bytes is received, instead do</p>
<pre class="prettyprint"><code>for message in socket.recv():
print(message)
</code></pre>
<p>Revision 2:
Added proper message receiving. Previously it just requested a ton of data. Now it reads 2 bytes, determines the length, then requests that much.</p>
Revisiting "Revenge of the auto-wrap": Another toggle-macro (JavaScript)
2010-10-04T23:51:41-07:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577417-revisiting-revenge-of-the-auto-wrap-another-toggle/
<p style="color: grey">
JavaScript
recipe 577417
by <a href="/recipes/users/4166930/">Eric Promislow</a>
(<a href="/recipes/tags/autowrap/">autowrap</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/togglemacro/">togglemacro</a>).
Revision 2.
</p>
<p>Komodo doesn't automatically wrap lines when they reach a certain length, which is a good trait to have in a code editor. However, for those times where you're editing non-code, it can be helpful to have newlines inserted automatically. Troy Topnik addressed this problem a couple of years ago, in his post <a href="http://www.activestate.com/blog/2008/11/revenge-auto-wrap-type-type-type-ding" rel="nofollow">http://www.activestate.com/blog/2008/11/revenge-auto-wrap-type-type-type-ding</a> . As Komodo 6 heads out the door, I've been writing blog posts, and found this feature useful. But his solution used two macros. I put my coding hat back on, and reimplemented it as a "toggle macro".</p>
Komodo JS Macro - delete marked lines (JavaScript)
2010-08-30T17:32:24-07:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577378-komodo-js-macro-delete-marked-lines/
<p style="color: grey">
JavaScript
recipe 577378
by <a href="/recipes/users/4166930/">Eric Promislow</a>
(<a href="/recipes/tags/bookmarks/">bookmarks</a>, <a href="/recipes/tags/editor/">editor</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>).
</p>
<p>You can set bookmarks in Komodo, for ease ni revisiting certain lines. This recipe lets you
delete all the marked lines in the current buffer. This code is undoable, but the markers
are gone for good. They aren't restored by Scintilla, and having Komodo restore them
would be a pain.</p>
A Komodo macro for duplicating the current file (Komodo 5 only!) (JavaScript)
2011-02-03T23:45:02-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577085-a-komodo-macro-for-duplicating-the-current-file-ko/
<p style="color: grey">
JavaScript
recipe 577085
by <a href="/recipes/users/4166930/">Eric Promislow</a>
(<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>).
</p>
<p>Komodo projects look like file managers, but don't always offer the same functionality directly.
Here's a macro that makes a copy of the current selected file in a project. To use it,
create a new macro in the Komodo toolbox, copy this code, paste it in the macro, and save it.
Then you can select a file, double-click the macro icon (or assign it to a keybinding),
and Komodo will create a copy of the file called "Copy of <basename>.<extension>".</p>
Komodo JS Macro - move current line up one (JavaScript)
2010-03-10T12:24:43-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577100-komodo-js-macro-move-current-line-up-one/
<p style="color: grey">
JavaScript
recipe 577100
by <a href="/recipes/users/4166930/">Eric Promislow</a>
(<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>).
</p>
<p>This Komodo macro moves the line containing the caret (cursor) up one line,
and then puts the caret at the start of that line in its new position.
Put the macro in your toolbox, and bind it to Ctrl-Shift-UpArrow
(unused in the default Komodo keybinding set) to get the same
functionality as in some other popular editors).</p>
Komodo JS Macro - move current line down one (JavaScript)
2010-03-10T12:25:06-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577101-komodo-js-macro-move-current-line-down-one/
<p style="color: grey">
JavaScript
recipe 577101
by <a href="/recipes/users/4166930/">Eric Promislow</a>
(<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>).
</p>
<p>This Komodo macro moves the line containing the caret (cursor) down one line,
and then puts the caret at the start of that line in its new position.
Put the macro in your toolbox, and bind it to Ctrl-Shift-DownpArrow
(unused in the default Komodo keybinding set) to get the same
functionality as in some other popular editors).</p>
The Matrix Effect (JavaScript)
2009-07-28T10:13:20-07:00Panda Moniomhttp://code.activestate.com/recipes/users/4171270/http://code.activestate.com/recipes/576861-the-matrix-effect/
<p style="color: grey">
JavaScript
recipe 576861
by <a href="/recipes/users/4171270/">Panda Moniom</a>
(<a href="/recipes/tags/dynamic_drive/">dynamic_drive</a>, <a href="/recipes/tags/effect/">effect</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/matrix/">matrix</a>, <a href="/recipes/tags/text/">text</a>).
</p>
<p>This code is and opensource code from Dynamic Drive.</p>
<p>Add the Matrix effect to any text. I have displayed the code for and entire demo page. Any text that you want to have the Matrix effect, put it inside <div id="matrix> and </div>.</p>
Javascript Namespaces (JavaScript)
2009-07-12T07:21:40-07:00Mike Kosshttp://code.activestate.com/recipes/users/4171086/http://code.activestate.com/recipes/576839-javascript-namespaces/
<p style="color: grey">
JavaScript
recipe 576839
by <a href="/recipes/users/4171086/">Mike Koss</a>
(<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/namespaces/">namespaces</a>).
Revision 2.
</p>
<p>This recipe enables you to modularize javascript libraries by placing all library code within a namespace object. All namespaces are rooted at "window.global_namespace". References between namespaces are supported by the Import function, which allows forward references to namespaces that have yet to be defined.</p>
<p>See code comment for more detailed examples.</p>