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
| // Copyright (c) 2006 Damien Miller <[email protected]> | |
| // | |
| // Permission to use, copy, modify, and distribute this software for any | |
| // purpose with or without fee is hereby granted, provided that the above | |
| // copyright notice and this permission notice appear in all copies. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| using System; | |
| using System.Diagnostics; | |
| namespace SunriseCalculator | |
| { | |
| public class SolarInfo | |
| { | |
| public double SolarDeclination { get; private set; } | |
| public TimeSpan EquationOfTime { get; private set; } | |
| public DateTime Sunrise { get; private set; } |
| #!/bin/bash | |
| # 参数1:延迟的时间,单位s | |
| # 参数2:需要执行的命令 | |
| # example: | |
| # delay 10 "conky -d" | |
| sleep $1 | |
| exec $2 |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
| /* | |
| * 12306 Auto Query => A javascript snippet to help you book tickets online. | |
| * 12306 Booking Assistant | |
| * Copyright (C) 2011 Hidden | |
| * | |
| * 12306 Auto Query => A javascript snippet to help you book tickets online. | |
| * Copyright (C) 2011 Jingqin Lynn | |
| * | |
| * 12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
| * Copyright (C) 2011 Kevintop |
| #!/bin/bash | |
| if ! hash git &> /dev/null || ! hash php &> /dev/null; then | |
| echo -e " *****\n ***** INSTALLING GIT AND PHP\n *****" | |
| if hash apt-get &> /dev/null; then | |
| sudo apt-get install git-core php5-cli php5-curl | |
| elif hash port &> /dev/null; then | |
| sudo port install php5-curl | |
| elif hash fink &> /dev/null; then |
Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.
| repositories { | |
| add(new org.apache.ivy.plugins.resolver.URLResolver()) { | |
| name = 'GitHub' | |
| addArtifactPattern 'http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]' | |
| } | |
| } | |
| dependencies { | |
| classpath '<githubId>:<artifact>:<revision>' | |
| } |
| //index.js | |
| var express = require('express'), | |
| app = module.exports = express.createServer(), | |
| mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/nodeAuth'); | |
| //configure app | |
| app.configure(function() { | |
| app.set('views', __dirname + '/views'); |