Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/mongo/util/net/sock.cpp b/src/mongo/util/net/sock.cpp
index 9c04cae..d75b9fb 100644
--- a/src/mongo/util/net/sock.cpp
+++ b/src/mongo/util/net/sock.cpp
@@ -131,7 +131,7 @@ void disableNagle(int sock) {
if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char*)&x, sizeof(x)))
error() << "SO_KEEPALIVE failed: " << errnoWithDescription() << endl;
-#ifdef __linux__
+#if 0

If you are still on Trusty you'll need a modern gcc toolchain.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
sudo apt-get update
sudo apt-get install build-essential git scons libssl-dev gcc-6 g++-6 
sudo apt-get install libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev
sudo apt-get install python-pymongo 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 1
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 1
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ubuntu-desktop build-essential git automake checkinstall gcc-6 g++-6 \
    intltool libtool \
    alsa-base alsa-utils alsa-tools libasound2 libasound2-plugins \
    libx11-dev libx11-xcb-dev check libsndfile1-dev libtdb-dev libgdbm-dev \
    libgtk-3-dev libgconf2-dev \
    libjack-dev jack libasyncns-dev libasyncns0 libwrap0-dev libwrap0 libsbc-dev libsbc1 \
    libavahi-common-dev libavahi-client3 libdbus-1-dev libssl-dev \
const os = require("os");
const fs = require("fs");
const Emitter = require('events');
var wslNetworkInterfaces = function() {
console.log("WSL has no idea what interfaces are available.");
return {
"Loopback Pseudo-Interface 1": [
{
"address": "::1",
@therealkenc
therealkenc / build-gn.sh
Created October 26, 2016 03:25 — forked from mohamed/build-gn.sh
Build Google gn build tool standalone
#!/bin/bash
set -e
set -v
# Get the sources
mkdir gn-standalone
cd gn-standalone
mkdir tools
cd tools
import java.io.IOException;
public class Main {
public static void main(String... args) throws IOException {
ProcessBuilder pb = new ProcessBuilder("echo", "test");
Process p = pb.start();
}
}
@therealkenc
therealkenc / gist:b239f169773816566aff7d58eb08f775
Created November 3, 2016 23:02
chrome-52.0.2743.82-wsl-nov3.patch
diff --git a/.gitignore b/.gitignore
index 0c609ce..3df0daa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,6 +51,10 @@ tags
Thumbs.db
v8.log
vs-chromium-project.txt
+# WSL diff additions for git performance
+/v8/
diff --git a/.gitignore b/.gitignore
index 0c609ce..3df0daa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,6 +51,10 @@ tags
Thumbs.db
v8.log
vs-chromium-project.txt
+# WSL diff additions for git performance
+/v8/
execve("./pid-proc", ["./pid-proc"], [/* 20 vars */]) = 0
brk(NULL) = 0x1db1000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2f8f150000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7ffff9ec7ea0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7ffff9ec7ea0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
execve("./pid-proc", ["./pid-proc"], [/* 67 vars */]) = 0
brk(NULL) = 0x2487000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f40ee1ba000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/x86_64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7ffe26844710) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7ffe26844710) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)