layout | title | date | categories |
---|---|---|---|
post |
SELinux and docker notes |
2018-02-13 13:13:59 +0200 |
docker selinux |
What it takes to run our containers with SELinux enabled.
# 1. redo last command but as root | |
sudo !! | |
# 2. open an editor to run a command | |
ctrl+x+e | |
# 3. create a super fast ram disk | |
mkdir -p /mnt/ram | |
mount -t tmpfs tmpfs /mnt/ram -o size=8192M |
``` | |
echo ':golang:E::go::/usr/local/bin/gorun:OC' | sudo tee /proc/sys/fs/binfmt_misc/register | |
:golang:E::go::/usr/local/bin/gorun:OC | |
``` | |
``` | |
package main | |
import ( | |
"fmt" |
bash-4.4# ruby-build -v 1.8.7 /usr/local | |
Downloading ruby-1.8.7.tar.bz2... | |
-> https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.bz2 | |
/tmp/ruby-build.20190128170412.7047 /tmp/ruby-build | |
Installing ruby-1.8.7... | |
WARNING: ruby-1.8.7 is past its end of life and is now unsupported. | |
It no longer receives bug fixes or critical security updates. | |
/tmp/ruby-build.20190128170412.7047/ruby-1.8.7 /tmp/ruby-build.20190128170412.7047 /tmp/ruby-build |
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) | |
[GCC 7.3.0] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import pyexcel as p | |
>>> dict_list=[{'alfa':['001','2'], 'beta':['001','3'], 'gamma':['001','2']}, | |
... {'alfa':['002','6'], 'beta':['002','4'], 'omega':['002','7']}] | |
>>> | |
>>> s = p.Sheet() | |
>>> for d in dict_list: | |
... s.row += p.get_sheet(adict=d, transpose_after=True) |
MySQL wizardry | |
Posted on June 5, 2001 | |
by Giuseppe_Maxia | |
“I called in the Wizard on a Friday evening. It was almost six p.m. and I was afraid he had already left for the day. Instead, he answered at the first ring. Wizards never go home early. He recognized me and asked how he could help. I told him. He listed patiently, without asking silly questions in between, and finally said ‘I think I could provide you with some useful tool. See you in half an hour’ and hung up.” | |
Cross tabulations are statistical reports where you de-normalize your data and show results grouped by one field, having one column for each distinct value of a second field. | |
Basic problem definition. Starting from a list of values, we want to group them by field A and create a column for each distinct value of field B. |
function MyClient() { | |
var self = this, | |
width = $('#map').width(), | |
mapCanvasHeight = (width * 0.45); | |
this.init = function() { | |
self.drawMap(); | |
self.drawMarker(); | |
self.drawArc(); | |
} |
### No longer needed as of nginx-1.13.9-1.el7_4.ngx.x86_64.rpm from nginx.org | |
### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works) | |
### nginx-module-njs-1.13.9.0.1.15-1.el7_4.ngx.x86_64.rpm | |
yum -y groupinstall 'Development Tools' | |
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools | |
OPENSSL="openssl-1.0.2l" | |
NGINX_VERSION="1.13.9-1" | |
NJS_VERSION="1.13.9.0.1.15-1" |