Skip to content

Instantly share code, notes, and snippets.

View doevelopper's full-sized avatar

Adrien H doevelopper

  • Versailles
View GitHub Profile
constexpr size_t MSG_Q_TICK_TIMEOUT = 10; // 10 seconds
template<class T>
class Resource
{
public :
virtual ~Resource<T>() = default;
>$ docker pull store/elastic/metricbeat:7.0.0-rc1 
>$ docker pull store/elastic/filebeat:7.0.0-rc1   
>$ docker pull store/elastic/auditbeat:7.0.0-rc1  
>$ docker pull store/elastic/packetbeat:7.0.0-rc1 
>$ docker pull store/elastic/heartbeat:7.0.0-rc1  
>$ docker pull store/elastic/apm-server:7.0.0-rc1 
>$ docker pull elastic/elasticsearch:7.0.0-rc1
>$ docker pull elastic/logstash:7.0.0-rc1
&gt;$ docker pull elastic/kibana:7.0.0-rc1
```cpp
/**
* Return the number of seconds elapsed between two time points.
*
* The two time points must be issued from the same clock -- otherwise this
* does not make sense.
*/
template <typename Clock, typename Duration1, typename Duration2>
double elapsed_seconds(std::chrono::time_point<Clock, Duration1> start,
std::chrono::time_point<Clock, Duration2> end)

Kubectl plugin

This plugin adds completion for the Kubernetes cluster manager, as well as some aliases for common kubectl commands.

To use it, add kubectl to the plugins array in your zshrc file:

plugins=(... kubectl)
    // Chromium's ranges from net/base/net_error_list.h:
    //         0 No error
    //     1- 99 System related errors
    //   100-199 Connection related errors
    //   200-299 Certificate errors
    //   300-399 HTTP errors
    //   400-499 Cache errors
    //   500-599 Internal errors
 // 600-699 FTP errors
[] () {} () ;

|  |  |  |
|  |  |  The lambda is invoked.
|  |  The lambda does not do anything.
|  The lambda does not take any arguments.
The lambda does not capture anything.
@doevelopper
doevelopper / gitlab-runner-dind.md
Last active July 11, 2019 14:57
docker Gitlab runner registration
$> docker run -d --name gitlab-runner --restart always \
   -v /srv/gitlab-runner/config:/etc/gitlab-runner \
   -v /var/run/docker.sock:/var/run/docker.sock \
   gitlab/gitlab-runner:latest

$> docker run --rm -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register \
    --non-interactive \
    --executor "docker" \
 --docker-image dtr.cpp-dev:latest \
(:)(\d{3},) ==>.\2
14:38:00:342,  ==> 14:38:00.342,
@doevelopper
doevelopper / Gitlab-runner.md
Last active August 5, 2019 16:04
Laun gitlabrunner manually
$> gitlab-runner exec [shell , docker] [make, docker:build:docker-base]
  $> $CC -v 2>&1 | grep hard
  $> $CC -Q --help=target
  $> $CC -c -Q -O3 --help=optimizers
  $> $CC -c -Q -O2 --help=optimizers
  $> $CC -dM -E -xc /dev/null
  $> $CXX -x c++ -std=c++17 -dM -E - | sort
  $> echo | $CXX -x c++ -std=c++17 -dM -E - | sort
  $> gcc -Wall -Wextra -Wpedantic -Q --help=warning
 $&gt; gcc -Q --help=warning,C