Install command line tools:
then run this:
git config --global diff.tool bc3
git config --global difftool.bc3 trustExitCode true
git config --global merge.tool bc3
# watch a file changes in the current directory, | |
# execute all tests when a file is changed or renamed | |
$watcher = New-Object System.IO.FileSystemWatcher | |
$watcher.Path = get-location | |
$watcher.IncludeSubdirectories = $true | |
$watcher.EnableRaisingEvents = $false | |
$watcher.NotifyFilter = [System.IO.NotifyFilters]::LastWrite -bor [System.IO.NotifyFilters]::FileName | |
while($TRUE){ |
var WebSocketServer = require('ws').Server; | |
var wss = new WebSocketServer({port: 8080}); | |
var jwt = require('jsonwebtoken'); | |
/** | |
The way I like to work with 'ws' is to convert everything to an event if possible. | |
**/ | |
function toEvent (message) { | |
try { |
/* | |
* Little example of how to use ```socket-io.client``` and ```request``` from node.js | |
* to authenticate thru http, and send the cookies during the socket.io handshake. | |
*/ | |
var io = require('socket.io-client'); | |
var request = require('request'); | |
/* | |
* This is the jar (like a cookie container) we will use always |
if (!process.env.http_proxy) return; | |
var url = require('url'); | |
var tunnel = require('tunnel'); | |
var proxy = url.parse(process.env.http_proxy); | |
var tunnelingAgent = tunnel.httpsOverHttp({ | |
proxy: { | |
host: proxy.hostname, | |
port: proxy.port |
//lets say you want to find the property on the `resp` object | |
//that contains the url of the request | |
request.get('http://example.com/foo/bar', (err, resp, body) => { | |
console.dir(findMatchingProperty(resp, v => typeof v === 'string' && v.match(/\/foo\/bar/))); | |
}); | |
/** | |
The result is: |
var nconf = require('nconf'); | |
var ldap = require('ldapjs'); | |
var async = require('async'); | |
ldap.Attribute.settings.guid_format = ldap.GUID_FORMAT_D; | |
var Users = module.exports = function(){ | |
var options = this._options = { | |
url: process.env["LDAP_URL"], | |
base: process.env["LDAP_BASE"], | |
bindDN: process.env["LDAP_BIND_USER"], |
var profiler = require('v8-profiler'); | |
process.on('SIGUSR2', () => { | |
const snapshot = profiler.takeSnapshot(); | |
const fileName = `/tmp/my-project-${Date.now()}.heapsnapshot`; | |
snapshot.export() | |
.pipe(fs.createWriteStream(fileName)) | |
.on('finish', () => { | |
console.log(`snapshot ${fileName} has been stored`); | |
snapshot.delete(); |
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "ctrl+left", | |
"command": "subwordNavigation.cursorSubwordLeft", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "ctrl+right", | |
"command": "subwordNavigation.cursorSubwordRight", |
This is a fork from the original CoreOS cloud formation template. It adds two EBS disks of 30G, mounted to /var/lib/docker.
This is intended to be used with an m3.large machine which comes with 30G of SSD.
The reason I add two of 30 and not one of 60 is because a BTRFS limitation.
You can use the "btrfs add" approach in the units to create a BTRFS raid.