I hereby claim:
- I am suside on github.
- I am suside (https://keybase.io/suside) on keybase.
- I have a public key ASAsODTiM_SHOTd3E_seKD-PQc6eYSoKCyKppNDS9rObLwo
To claim this, I am signing this object:
let UnionToString (u: 'a) = | |
match FSharpValue.GetUnionFields(u, typeof<'a>) with | |
| case, _ -> case.Name | |
let StringToUnion<'a> (s: string) = | |
match FSharpType.GetUnionCases typeof<'a> |> Array.filter (fun case -> case.Name = s) with | |
| [| case |] -> FSharpValue.MakeUnion(case, [||]) :?> 'a | |
| _ -> failwithf "Unable to parse %A" s | |
type UnionStringSerializer<'a>() = |
I hereby claim:
To claim this, I am signing this object:
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | |
echo: | |
echo $(MAKEFILE_LIST) | |
echo $(lastword $(MAKEFILE_LIST)))) | |
echo $(realpath $(lastword $(MAKEFILE_LIST)))) |
balance source
in haproxy.server
section in haproxy config should have all your k8s nodes.sessionAffinity
in k8s is irrelevant.nodePort
set and this annotation:kubectl annotate service myService service.beta.kubernetes.io/external-traffic=OnlyLocal
This will cause internal k8s loadbalancer on nodeⁿ to route traffic only to pod on nodeⁿ. From Haproxy point of view it will look like nodeⁿ:nodePort
=== pod on nodeⁿ:port
thus disabling k8s LB completly.
#!/bin/bash | |
echo "***************************** CONTAINERS *****************************" | |
for F in `journalctl -F CONTAINER_NAME` | |
do | |
echo "$(journalctl CONTAINER_NAME=$F | wc -c | awk '{ print $1/1024/1024"MB" }') $F" | |
done | sort -nrk 1 | column -c 2 | |
echo "***************************** UNITS *****************************" | |
for F in `journalctl -F UNIT` |
const R = require('ramda'); | |
const _ = R.curry((tpl, data) => R.reduce((ac, k) => R.replace(`{{${k}}}`, data[k], ac), tpl, R.keys(data))); | |
_('Hello {{var}}', {var: 'world'}); // => Hello world | |
const compiled = _('{{var1}} {{var2}}'); | |
compiled({var1: 'Hello', var2: 'world'}); // => Hello world |
import re | |
from subprocess import call | |
import requests | |
from sniffer.api import runnable | |
@runnable | |
def execute_tests(*args): | |
result = call(str(args[1] + ' --verbosity 2 --nologcapture --stop --with-xunit --xunit-file=/run/shm/test_output.xml').split(' ')) == 0 |
diff --git a/extension/xhprof.c b/extension/xhprof.c | |
index f553a35..7db4f00 100644 | |
--- a/extension/xhprof.c | |
+++ b/extension/xhprof.c | |
@@ -1775,35 +1775,7 @@ ZEND_DLEXPORT void hp_execute_internal(zend_execute_data *execute_data, | |
BEGIN_PROFILING(&hp_globals.entries, func, hp_profile_flag); | |
} | |
- if (!_zend_execute_internal) { | |
- /* no old override to begin with. so invoke the builtin's implementation */ |
/* | |
Allows for ajax requests to be run synchronously in a queue | |
Usage:: | |
var queue = new $.AjaxQueue(); | |
queue.add({ | |
url: 'url', |
#! /usr/bin/python | |
# -*- coding: utf-8; -*- | |
""" | |
Copyright (C) 2007-2012 Lincoln de Sousa <[email protected]> | |
Copyright (C) 2007 Gabriel Falcão <[email protected]> | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License as | |
published by the Free Software Foundation; either version 2 of the | |
License, or (at your option) any later version. |