[Unit] | |
Description=Datadog Docker Swarm | |
After=systemd-journald.service | |
Requires=systemd-journald.service | |
[Service] | |
ExecStart=/bin/zsh -c "coproc while true; do ncat --ssl intake.logs.datadoghq.com 10516; done ;journalctl -o json -f | jq -r --unbuffered '\"c441ade4f5f4d04c \" + ({ message:.MESSAGE, service_name:.COM_DOCKER_SWARM_SERVICE_NAME, container:.CONTAINER_NAME, containerid:.CONTAINER_ID_FULL, host:._HOSTNAME,pid:(._PID // \"-\"), timestamp:(.__REALTIME_TIMESTAMP|tonumber/1000000|todate),\"syslog.severity\":((.PRIORITY|tonumber)) }|tostring)' >&p 2>&p" | |
This is very easy to describe to voters: vote for everyone you approve of.
MOTA does one thing very well - it removes any reason to vote against your favorite candidate.
In any voting system, if there's only ONE candidate - not voting and voting for the candidate are the same.
For TWO candidates - it is better to pick the one you like more.
# run using ```rvm jruby-1.6.7 do jruby "-J-Xmx2000m" "--1.9" tej.rb``` | |
require 'rubygems' | |
require 'nokogiri' | |
require 'csv' | |
f = File.open("/tmp/preview.html") | |
doc = Nokogiri::HTML(f) | |
csv = CSV.open("/tmp/output.csv", 'w',{:col_sep => ",", :quote_char => '\'', :force_quotes => true}) |
###avoid the error "this installation does not support your system architecture, (32/64 bits)"
export WINEPREFIX=~/.wine_ie8 #make sure this is a BRAND NEW DIRECTORY
export WINEARCH=win32 # make sure you do this BEFORE you install IE8
###download
http://www.dll-files.com/dllindex/dll-files.shtml?msctf
http://www.dll-files.com/dllindex/dll-files.shtml?msimtf
http://www.dll-files.com/dllindex/dll-files.shtml?uxtheme
- if CBV terminates, then so does CBN - since CBN will evaluate less than or equal parameters than CBV
- CBV avoids repeated recomputation of values
- force scala to do CBN, by defining
def fun(x:Int, y:=>Int)
- disjunction and conjunction (&& and ||) are short-circuit operators - the right side will only be evaluated in certain cases.
- in certain cases like
if(r==0) return 1
there is an errorScala: type mismatch; found : Unit required: Boolean
- this happens because you have to have an else clause, otherwise the type checker doesn't know what the return type is when it's not the case
return fn(a-1)
is tail recursive butreturn n * fn(a-1)
is not
<?php | |
require("./amazon-sdk/sdk.class.php"); | |
// on ubuntu - this script can be run using php5-cli and php5-curl | |
//Provide the Key and Secret keys from amazon here. | |
$AWS_KEY = "kkk"; | |
$AWS_SECRET_KEY = "kkkk+xKcdkB"; | |
//certificate_authority true means will read CA of amazon sdk and false means will read CA of OS | |
$CA = true; |
1. If ur upgrading from an older fedora, | |
1.1 `sudo dnf remove docker-*` | |
1.2 `sudo dnf config-manager --disable docker-*` | |
1.2 please ensure `/etc/default/grub` doesnt contain `systemd.unified_cgroup_hierarchy=0`. If it does contain, then remove it and run `sudo grub2-mkconfig -o /boot/grub2/grub.cfg` | |
2. reboot | |
3. set firewall correctly using `sudo firewall-cmd --zone=docker --change-interface=docker0` | |
4. in `/etc/sysconfig/docker` please ensure `--live-restore` is removed | |
5. reboot | |
6. docker should work |
d <- data.frame(PT=c(3,2,5,1)) | |
d <- data.frame(d, capacity=1/d$PT) | |
d$flow_rate <- min(d$capacity) # no demand numbers here | |
d <- data.frame(d, process_capacity=min(d$capacity)) | |
d <- data.frame(d, cycle_time=1/d$process_capacity) | |
d <- data.frame(d, dlc=sum(d$PT)) | |
d <- data.frame(d, idle_time=d$cycle_time-d$PT) | |
d <- data.frame(d, total_idle_time=sum(d$idle_time)) | |
d <- data.frame(d, total_labor_content=sum(d$PT)) | |
d <- data.frame(d, labor_util=d$total_labor_content/(d$total_labor_content+d$total_idle_time)) |
# DOCKER-VERSION 1.0 | |
# run with curl <gist path> | docker build -t sandys/rbenv - | |
#when exiting/stopping a container it remains in the filesystem | |
#every time we run docker run a new container is created | |
#https://github.com/dotcloud/docker/issues/3258 | |
#stop all containers docker stop $(docker ps -a -q) | |
#rm all containers docker rm $(docker ps -a -q) |