All of the following information is based on go version go1.17.1 darwin/amd64
.
GOOS | Out of the Box |
---|---|
aix |
✅ |
android |
✅ |
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit | |
# Copyright (c) 2021 Marat Reymers | |
## Golden config for golangci-lint v1.62.0 | |
# | |
# This is the best config for golangci-lint based on my experience and opinion. | |
# It is very strict, but not extremely strict. | |
# Feel free to adapt and change it for your needs. | |
run: |
import matplotlib.pyplot as plt | |
import numpy as np | |
from mpl_toolkits.mplot3d import Axes3D | |
SIZE = 10 # How big you'd like to draw | |
fig = plt.figure() | |
# OR USING `ax = fig.add_subplot(1, 1, 1, projection='3d')` | |
ax = Axes3D(fig) |
import imaplib2, time | |
from threading import * | |
# This is the threading object that does all the waiting on | |
# the event | |
class Idler(object): | |
def __init__(self, conn): | |
self.thread = Thread(target=self.idle) | |
self.M = conn | |
self.event = Event() |
This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.
I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/
in my Dockerfiles, and also work from
isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/
.
At the end of the day, vendoring (and committing vendor/
) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:
/* | |
Benchmark_RWMutex-4 100000000 18.1 ns/op | |
Benchmark_Atomic-4 200000000 8.01 ns/op | |
Benchmark_RWMutex_parallel-4 30000000 46.7 ns/op | |
Benchmark_Atomic_parallel-4 1000000000 2.61 ns/op | |
*/ | |
package main |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
#include <stdlib.h> | |
#include <unistd.h> | |
#include <uv.h> | |
typedef struct req_bundle_s { | |
uv_loop_t *loop; | |
uv_fs_t *read_req; | |
uv_fs_t *writ_req; |
#!/usr/bin/env python3 | |
import socket | |
import struct | |
import traceback | |
import subprocess | |
import time | |
import signal | |
import dnslib |
sudo yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel | |
wget https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz | |
tar xf v2.1.0.tar.gz | |
cd libwebsockets-2.1.0 | |
mkdir build; cd build | |
cmake .. -DLIB_SUFFIX=64 | |
sudo make install | |
echo "/usr/local/lib64" | sudo tee -a /etc/ld.so.conf.d/libwebsockets.conf | |
sudo ldconfig | |
ldconfig -p | grep libwebsockets |