试一试 [试一试](javascript:var script;document.body.appendChild(script=document.createElement('script'));script.setAttribute('src','https://raw.github.com/layerssss/touchy/touchy.js'))
This file contains hidden or 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
| gist.hello({ | |
| salutation:'hi' | |
| }); |
This file contains hidden or 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
| fs = require 'fs' | |
| _z = (errcb, cb)-> | |
| return ()-> | |
| return errcb.apply null, arguments if arguments[0] | |
| return cb.apply null, arguments | |
| myfunc = (handler) -> # like `app.get '/', (req, res, next)->` in `express` | |
| handler 'dummy1', 'dummy2', 'dummy3', 'dummy4', (err, data)-> |
This file contains hidden or 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
| # Usage: `curl https://gist.github.com/raw/4618705/mirror.sh | sh` | |
| rm -Rf /srv/mdn.micy.in.new | |
| wget \ | |
| --recursive \ | |
| --level=3 \ | |
| --wait=1 \ | |
| --adjust-extension \ | |
| --convert-links \ | |
| --backup-converted \ |
This file contains hidden or 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
| var x; | |
| var y; | |
| if (e.pageX || e.pageY) { | |
| x = e.pageX; | |
| y = e.pageY; | |
| } | |
| else { | |
| x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; | |
| y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; |
This file contains hidden or 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
| # usage: curl https://gist.github.com/raw/4631928/mirrornodejsdoc.sh | sh | |
| wget \ | |
| --recursive \ | |
| --level=5 \ | |
| --adjust-extension \ | |
| --convert-links \ | |
| --backup-converted \ | |
| --no-host-directories \ | |
| --page-requisites \ | |
| --timestamping \ |
This file contains hidden or 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
| all: components node_modules | |
| components: node_modules component.json | |
| node_modules/bower/bin/bower install | |
| touch $@ | |
| node_modules: package.json | |
| npm install | |
| touch $@ | |
| clean: |
This file contains hidden or 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 sh | |
| # install nodejs on linux x64. | |
| # usage: | |
| # curl 'https://gist.github.com/layerssss/5105454/raw/install_nodejs_linux_x64.sh' | sudo bash | |
| NODE=`curl http://nodejs.org/dist/latest/ | perl -ne 'while(/\"(node[^\"]*linux-x64).tar.gz"/g){print "$1\n";}'` | |
| echo Installing $NODE ... | |
| curl http://nodejs.org/dist/latest/$NODE.tar.gz -o ./node.tar.gz | |
| tar xvzf node.tar.gz |
This file contains hidden or 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
| svg.selectAll "polygon", | |
| data: [polyData] | |
| enter: | |
| append: 'polygon' | |
| style: | |
| "stroke": "gray" | |
| "stroke-width": 2 | |
| "fill": 'none' |
OlderNewer