If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| # Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software. | |
| # To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module | |
| # This module "secure-link" helps you to protect links from stealing away. | |
| # | |
| # NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg | |
| cd /usr/src | |
| wget http://nginx.org/download/nginx-1.5.13.tar.gz | |
| tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz |
| exports.createHandler = function (method) { | |
| return new Handler(method); | |
| } | |
| Handler = function(method) { | |
| this.process = function(req, res) { | |
| params = null; | |
| return method.apply(this, [req, res, params]); | |
| } | |
| } |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| // Current value is empty | |
| this.isEmpty = function(value){ | |
| return value == null // NULL value | |
| || value == undefined // undefined | |
| || value == 'undefined' // undefined | |
| || value.length == 0 // Array is empty | |
| || value == '00000000-0000-0000-0000-000000000000' // Guid empty | |
| || ((value instanceof Date && !isNaN(value.valueOf())) // Validate DateTime value and check min-max value | |
| && ((value <= new Date(1753, 01, 01)) // SQL DateTime minimum value | |
| || (value >= new Date(9999, 12, 31, 23, 59, 59, 999))) // SQL DateTime maximum value |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Foo struct { | |
| FirstName string `tag_name:"tag 1"` | |
| LastName string `tag_name:"tag 2"` |
Twelve Go Best Practices
Francesc Campoy Flores Gopher at Google @francesc http://campoy.cat/+
Command Flags
| Flag | Options | Description |
|---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
brew install ffmpeg| class ImageUpload extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| file: '', | |
| imagePreviewUrl: '' | |
| }; | |
| this._handleImageChange = this._handleImageChange.bind(this); | |
| this._handleSubmit = this._handleSubmit.bind(this); | |
| } |
| <?php | |
| // tried this today, 31 May 2011 | |
| echo "\n"; | |
| echo date('Y-m-d', strtotime('first day of next month')); // correct | |
| echo "\n"; | |
| echo date('Y-m-d', strtotime('+1 month')); // wrong! output is 2011-07-01 | |
| echo "\n"; |