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) 2011 Thomas Fuchs, http://mir.aculo.us | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so, subject to | |
| the following conditions: | |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| <?php | |
| /** | |
| * Mimetype for your file - requires PHP 5.3, not enabled on default by Windows | |
| */ | |
| $php_mime = finfo_open(FILEINFO_MIME); | |
| $this->mime_type = strtolower(finfo_file($php_mime, $this->your_file_path_and_name)); | |
| finfo_close($php_mime); | |
| // Thanks for great discussion from Ben Ramsey, Anthony Ferrara, Dave Reid, Jarvis Badgley |
#Node - Running in Production
This gist is based on the excellent post by @hacksparrow which is found at http://www.hacksparrow.com/running-express-js-in-production-mode.html. The main principle is that you want the application to detect that it is running on a production server and to use the production configuration. The way to do this is to set the NODE_ENV=production. To do this you need to do the following:
$ export NODE_ENV=production
But we have a little problem here. The NODE_ENV environment variable will be lost if the server restarts, so it is safer to put it in the .bash_profile file. That way the variable will set again every time the system reboots. You will find the file in your home directory. It's a hidden file, so you can't see it unless you do a ls -la. We will append the export command to the .bash_profile file.
| { | |
| "auto_complete_commit_on_tab": false, | |
| "auto_id_class": true, | |
| "bold_folder_labels": true, | |
| "caret_style": "phase", | |
| "color_scheme": "Cache/Theme - Default/Cam.tmTheme", | |
| "command": "whitespacecorrector", | |
| "create_window_at_startup": false, | |
| "detect_slow_plugins": false, | |
| "draw_minimap_border": false, |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
| Banana Bread (adapted from the St. Peter's Catholic Church Cookbook from my childhood) | |
| 1/2 cup butter (about half a 250g bar) softened | |
| 1 1/4 cup sugar (about 250 g) | |
| 2 eggs | |
| 1 1/2 cup flour (about 180 g) | |
| 3/4 tsp baking powder | |
| 2 1/2 tsp milk | |
| 1/2 tsp vinegar | |
| 1 tsp vanilla |