- Create a Dockerfile
FROM jenkins/jenkins:lts
USER root
RUN apt-get update \
&& apt-get install -y sudo \
&& rm -rf /var/lib/apt/lists/*
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoersFROM jenkins/jenkins:lts
USER root
RUN apt-get update \
&& apt-get install -y sudo \
&& rm -rf /var/lib/apt/lists/*
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoersIn PostgreSQL, difference between two timestamps in minutes can be calculated by providing the EPOCH as a sub-field to the EXTRACT function, and the result from the EXTRACT will be divided by 60 to get the minutes.
Example
SELECT EXTRACT(EPOCH FROM ((NOW() + interval '1 day')::TIMESTAMPZ - NOW())) / 60 AS minutesSELECT EXTRACT(EPOCH FROM (end_date - start_date)) / 60 AS minutes| package bits | |
| import "fmt" | |
| /* | |
| * Check this (https://alemil.com/bitmask) for full article | |
| */ | |
| const ( | |
| CanRun = 1 << 0 // 1 | |
| CanBark = 1 << 1 // 2 |
| #!/bin/sh | |
| wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz -O nanomsg-1.0.0.tar.gz | |
| tar -xzvf nanomsg-1.0.0.tar.gz | |
| cd nanomsg-1.0.0 | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local | |
| cmake --build . | |
| ctest -G Debug . |
| #!/usr/bin/env bash | |
| # Authorize to GitHub to get the latest release tar.gz | |
| # Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/ | |
| # Requires: jq package to parse json | |
| # Your oauth token goes here, see link above | |
| OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk" | |
| # Repo owner (user id) | |
| OWNER="your-user-name" |
| package galileo_gists | |
| import ( | |
| "strings" | |
| "time" | |
| "math/rand" | |
| "os" | |
| "encoding/base64" | |
| "image" | |
| "image/png" |