Skip to content

Instantly share code, notes, and snippets.

View EugenMayer's full-sized avatar
🏠
Working from home

Eugen Mayer EugenMayer

🏠
Working from home
View GitHub Profile
@EugenMayer
EugenMayer / docs
Created July 28, 2016 18:19
/Library/LaunchDaemons/de.kontextwork.docker.loopback.plist
- name the file as you please, does not matter
- ensure the file is owned by root:wheel or it will not be used
It will create a loopback device 10.254.254.254 which can be used a remote_host in containers like xdebug configuration
- configure xdebug the way shown below.
Why all this?
- docker for mac will not allow to use connect_back
- you would need to use the user-specific ip of the current users interface ( eth/wlan ) in remote_host .. this way either your bootstrap becomes utterly complex or the dev images are not portable from developer to developer
def wait_for_db(ip, port)
$stdout.sync = true
begin
puts 'Waiting for consul...'
Timeout::timeout(50) do
print '.'
begin
s = TCPSocket.new(ip, port)
s.close
/* global define */
/* ================================================
* Make use of Bootstrap's modal more monkey-friendly.
*
* For Bootstrap 3.
*
* javanoob@hotmail.com
*
* https://github.com/nakupanda/bootstrap3-dialog
@EugenMayer
EugenMayer / actual issue-case
Last active April 25, 2019 20:11
portus notification test
When the registry trys to contact the notification endpoint itself, this happens:
8/20/2016 10:12:10 AMERRO[1005] retryingsink: error writing events: httpSink{http://portus:3000/v2/webhooks/events}: error posting: Post http://portus:3000/v2/webhooks/events: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers), retrying
8/20/2016 10:12:10 AMWARN[1005] httpSink{http://portus:3000/v2/webhooks/events} encountered too many errors, backing off
As you see above, i can contact portus, more i can even post using curl without any issues.
require 'docker-compose'
threads = []
project_paths = %w(/project/path1 /project/path2 /project/path3 /project/path)
project_paths.each do |path|
threads.push Docker::Compose::Session.new(dir:compose_base_path1)
end
@EugenMayer
EugenMayer / debian
Created October 3, 2016 21:31
php5.5-igbinary missing
/ cat /etc/debian_version
8.6
Same problem here, though, it have some other informations. I upgraded 2 ubuntu 14 LTS boxes from 8.5 to 8.7.(1) going as 8.5->8.6->8.7.0->8.7.1 ... the first box has the issue described here, the second does not.
I compared basically any possible configuration, `zmprov gacf | grep -i proxy` only has the difference in the zimbraReverseProxyUpstreamLoginServers as expected, nothing else.
Anything else seems configured exactly the same. So
/opt/zimbra/libexec/zmproxyconfig -e -w -o -a 8080:80:8443:443 -x https -H `zmhostname`
But the working ( 2nd ) box has https://, the first broken box has http:// - both using ips not hostnames. As described just changing the schema to https fixes it.
Then i found one difference which can matter: `zmprov -garpb`
@EugenMayer
EugenMayer / fix_d4m.sh
Last active April 17, 2017 12:32
fix_d4m.sh
#!/bin/bash
set -e
cd ~/Library/Containers/com.docker.docker/Data/database
git reset --hard
echo -n "Current full-sync-on-flush setting: "
P=~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/disk/full-sync-on-flush
if [ -f $P ]; then
echo "file exists"
#!/bin/bash
set -e
# compile
echo compiling ACPI tables
cd ./ACPI-Tables && iasl -dl -da SS*.aml DSDT.aml && cd ..
# patch 1 - DSDT name
# patch 2 - rename XHCI to XHC
#!/bin/bash
set -e
#### READ THIS
# put this script to /usr/loca/bin/install_zimbra_le and make it executable
# expected letsencrypt to be in /etc/ssl/letsencrypt
# setup certbot or acme.sh to pull your certificates from letsencrypt using this command
# ./acme.sh --issue --dns dns_cf --dnssleep 25 -d $DOMAIN --reloadcmd "/usr/loca/bin/install_zimbra_le"