As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| (function () { | |
| try { | |
| if (!google.doodle) google.doodle = {}; | |
| var a = 200, | |
| g = -200, | |
| j = -200, | |
| k, l, m, n = 0, | |
| o = 0, | |
| p = 0, | |
| q = 35, |
| if(!jQuery('<input PLACEHOLDER="1" />')[0].placeholder){ //Uppercase attr for IE | |
| jQuery(':input[placeholder]').each(function(){ | |
| var $this = $(this); | |
| if(!$this.val()){ | |
| $this.val($this.attr('placeholder')); | |
| $this.addClass('input-placeholder'); | |
| } | |
| }).live('focus', function(e){ | |
| var $this = $(this); | |
| if($this.hasClass('input-placeholder')){ |
| var child_process = require('child_process'), | |
| sys = require('sys'), | |
| http = require('http'), | |
| parse = require('url').parse, | |
| fs = require('fs'); | |
| var spawn = child_process.spawn; | |
| var exec = child_process.exec; | |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
| #################################################################################### | |
| ## ## | |
| ## gittyup() - Easily keep master in sync with upstream. ## | |
| ## ## | |
| ## Author: Evan Coury, http://blog.evan.pro/ ## | |
| ## URL: https://gist.github.com/1506822 ## | |
| ## ## | |
| ## This bash function is a simple shortcut for keeping your local (and public ## | |
| ## fork / origin remote) master branch up to date and in sync with the upstream ## | |
| ## master. To use gittyup(), simply drop this in your ~/.bashrc. ## |
| # Add to ~/.bash_profile | |
| function chrome() { | |
| open $@ --args --allow-file-access-from-files | |
| } | |
| # Usage - chrome index.html | |
| # now you don't have to worry about those pesky local XHR issues in Chrome. |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Web Workers</title> | |
| </head> | |
| <body> | |
| <script id="worker" type="app/worker"> | |
| addEventListener('message', function() { | |
| postMessage('What up, sucka.'); |