(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
### Nginx upstart script | |
### source: http://serverfault.com/a/391737/70451 | |
### /etc/init/nginx.conf | |
description "nginx http daemon" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/usr/local/sbin/nginx |
#Covert Data URI to Blob
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |
import { Observable } from 'rxjs/Observable'; | |
import { ConnectableObservable } from 'rxjs/observable/ConnectableObservable'; | |
import { Subscription } from 'rxjs/Subscription'; | |
import { async } from 'rxjs/scheduler/async'; | |
/* This operator makes more sense when used with .publishReplay(1), as example below: | |
* | |
* let some$ = Observable.create(observer => { | |
* console.log(1110); | |
* observer.next('a value'); |
|
in OS X 10.4 to macOS sierra 10.12 and maybe higher!
Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:
TypeScript has support for type-checking plain JavaScript files, which is very useful if you have an existing JS codebase and you want to test the waters and gradually add types.
There are some limitations in what you can do in JSDoc, but a lot of them can be worked-around by using type-definition files .d.ts
(for example in a types/
directory). These files don't generate any JavaScript code, they are just there to provide extra type definitions to the compiler.
One thing you can't do in those .d.ts
files though, is use enums. You could define them of course, but you won't get the runtime representation since the files don't generate JS code.