Using the -ldflags
parameter can help set variable values at compile time.
Using the example provided here:
- Running
make build
will create abuild
executable. Running it will result in:
$> ./build
no version (Mon YYYY)
$>
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
Using the -ldflags
parameter can help set variable values at compile time.
Using the example provided here:
make build
will create a build
executable. Running it will result in:$> ./build
no version (Mon YYYY)
$>
#!/bin/bash | |
# | |
# dockerpsns - proof of concept for a "docker ps --namespaces". | |
# | |
# USAGE: ./dockerpsns.sh | |
# | |
# This lists containers, their init PIDs, and namespace IDs. If container | |
# namespaces equal the host namespace, they are colored red (this can be | |
# disabled by setting color=0 below). | |
# |
package main | |
// More info on Getwd() | |
// https://golang.org/src/os/getwd.go | |
// | |
import( | |
"os" | |
"fmt" | |
"log" | |
) |
reference: http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x | |
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm | |
yum update git |
The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0
Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.
This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
void ping(int s, char *message) | |
{ | |
char buf[8192]; |
/* | |
* simpleprocess.cpp | |
* | |
* Created on: Jun 26, 2015 | |
* Author: Marco Massenzio | |
*/ | |
#include <iostream> | |
#include <process/dispatch.hpp> |
sudo yum install libmpc-devel mpfr-devel gmp-devel | |
cd ~/Downloads | |
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O | |
tar xvfj gcc-4.9.2.tar.bz2 | |
cd gcc-4.9.2 | |
./configure --disable-multilib --enable-languages=c,c++ | |
make -j 4 | |
make install |