go install golang.org/dl/gotip@latest
gotip download
mkdir /tmp/gopls && cd "$_"
gotip mod init gopls-unstable
function compress(string, encoding) { | |
const byteArray = new TextEncoder().encode(string); | |
const cs = new CompressionStream(encoding); | |
const writer = cs.writable.getWriter(); | |
writer.write(byteArray); | |
writer.close(); | |
return new Response(cs.readable).arrayBuffer(); | |
} | |
function decompress(byteArray, encoding) { |
set -ex | |
sudo apt-get build-dep libmemcached-tools | |
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz | |
tar zxvf libmemcached-1.0.18.tar.gz | |
cd libmemcached-1.0.18/ | |
LDFLAGS='-lpthread' CXXFLAGS='-fpermissive' CFLAGS='-Wno-errors -fpermissive' ./configure --enable-memaslap --with-pthread=yes | |
make -j12 | |
sudo make install | |
sudo ldconfig |
const std = @import("std"); | |
const warn = @import("std").debug.warn; // XXX DEBUG | |
const assert = std.debug.assert; | |
const c = @cImport({ | |
@cInclude("uv.h"); | |
}); | |
pub const UVError = error{ E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EAI_ADDRFAMILY, EAI_AGAIN, EAI_BADFLAGS, EAI_BADHINTS, EAI_CANCELED, EAI_FAIL, EAI_FAMILY, EAI_MEMORY, EAI_NODATA, EAI_NONAME, EAI_OVERFLOW, EAI_PROTOCOL, EAI_SERVICE, EAI_SOCKTYPE, EALREADY, EBADF, EBUSY, ECANCELED, ECHARSET, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDESTADDRREQ, EEXIST, EFAULT, EFBIG, EHOSTUNREACH, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, EMFILE, EMSGSIZE, ENAMETOOLONG, ENETDOWN, ENETUNREACH, ENFILE, ENOBUFS, ENODEV, ENOENT, ENOMEM, ENONET, ENOPROTOOPT, ENOSPC, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTSOCK, ENOTSUP, EPERM, EPIPE, EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESHUTDOWN, ESPIPE, ESRCH, ETIMEDOUT, ETXTBSY, EXDEV, UNKNOWN, EOF, ENXIO, EMLINK }; |
#!/usr/bin/env bash | |
# Licensed by author Alex Birch under CC BY-SA 4.0 | |
# https://creativecommons.org/licenses/by-sa/4.0/ | |
# Example input: | |
# ./make_portable.sh mycoolbinary | |
# where mycoolbinary is a mach-o object file | |
# (for example an executable binary or a .dylib) | |
# |
conn, err := grpc.Dial( | |
s.rpcSocketPath, | |
grpc.WithInsecure(), | |
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { | |
return net.DialTimeout("unix", addr, timeout) | |
})) | |
if err != nil { | |
log.Fatalf("did not connect: %v", err) | |
} | |
defer conn.Close() |
Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
Watch a table for changes and push a notification with a payload describing the change.
In the Postgres shell:
-- Create the functions
package proxy | |
import ( | |
"io" | |
"net" | |
"sync" | |
log "github.com/Sirupsen/logrus" | |
) |