Skip to content

Instantly share code, notes, and snippets.

View janl's full-sized avatar
🛋️
Drop ICE

Jan Lehnardt janl

🛋️
Drop ICE
View GitHub Profile
@janl
janl / hi.txt
Created October 31, 2016 18:43
Hi Am Anita,
Nice to meet you,
i saw your email on github.com and i decided to communicate
with you,in your usual time may it please you to
reply me here for my pictures, my details,
and my purpose of writing to you.
please i don't have much access on github.com due to some
personal reasons,
@janl
janl / Makefile
Created October 23, 2016 08:29
CouchDB 0.5.0 Custom Makefile by @janl
# CouchDb Makefile
# (c) 2006 Jan Lehnardt <jan@php.net>
# This program is Free Software. See license.txt
UNICODE_INCLUDE_DIR ?= /usr/include/
ERLANG_INCLUDE_DIR ?= /usr/lib/erlang/driver
COUCHDB_INSTALL_DIR ?= /usr/local/couchdb
ERLC ?= /usr/bin/erlc
npm ERR! fetch failed https://registry.npmjs.org/@bahmutov/parse-github-repo-url/-/parse-github-repo-url-0.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 504
diff --git a/dev/run b/dev/run
index 147bead..303dc7f 100755
--- a/dev/run
+++ b/dev/run
@@ -393,7 +393,10 @@ def cluster_setup(ctx):
if enable_cluster(lead_port, *ctx['admin']):
for num in range(1, ctx['N']):
node_port, _ = get_ports(num + 1)
- enable_cluster(node_port, *ctx['admin'])
+ enabled = enable_cluster(node_port, *ctx['admin'])

I’m connected via ethernet and DHCP, the DHCP provided nameserver is 10.0.0.111 and running dnsmasq for example.com to resolve to 10.0.0.110 when on the local network, while the ip for example.com on the open internet is 91.65.182.25.

Why would Mac OS X, after resetting the DNS cache first resolve the domain correctly, and then after a few minutes somehow get the public DNS ip?

ping, Safari, etc. are all affected. There is nothing going on in the 360 seconds wait time.

> sudo killall -HUP mDNSResponder && ping -c 3 example.com && sleep 360 && ping -c 3 example.com
Password:
PING example.com (10.0.0.110): 56 data bytes
module.exports.checkStorage = function () {
try {
global.mozSimpleStorage = require('sdk/simple-storage');
} catch() {
global.mozSimpleStorage = false;
}
if (chrome.storage) { // We're running inside the Chrome/Web Extension context
return 'chromeOrWebExt';
} else if (window.localStorage) { // We're running inside a normal webpage

I have a service running on a LAN that are also exposed over the WAN, say Service A is reachable under example.com and it’s running on Host A in the LAN. The way this is implemented is port forwarding in the WAN gateway in the LAN:

public_ip:80 -> host_a_ip:80

Now I have a laptop that is often in the LAN, but not always. When that laptop is in the LAN, it can’t reach example.com, because the gateway port forwarding doesn’t work for internal requests (and their is no option to add/enable this). I also can’t replace the gateway router. So when that laptop wants to access example.com while in the LAN, it has to use the internal LAN ip of Host A.

Rest assured this is annoying. How can I make it, so the laptop can reach example.com regardless of whether it is in the LAN or not?

Options:

@janl
janl / ci.log
Created September 18, 2015 14:20
Started by upstream project "2.0-release-candidate" build number 25
originally caused by:
Started by user Jan Lehnardt
Building remotely on Ubuntu-14.04-LTS in workspace /home/jan/.jenkins/workspace/2.0-release-candidate/label/Ubuntu-14.04-LTS
Fetching changes from the remote Git repository
Fetching upstream changes from git://10.0.0.2/couchdb.git
Checking out Revision 52924ce461c54c6b8406abde017aa0c426d7811c (origin/master)
[Ubuntu-14.04-LTS] $ /bin/sh -xe /tmp/hudson3285222030750369684.sh
+ PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
+ cd /home/jan/.jenkins/workspace/2.0-release-candidate/label/Ubuntu-14.04-LTS
This file has been truncated, but you can view the full file.
12006 silly gunzTarPerm extractEntry LICENSE
12007 silly gunzTarPerm extractEntry writable.js
12008 silly install resolved []
12009 verbose about to build /usr/local/lib/node_modules/hoodie-cli/node_modules/insight/node_modules/request/node_modules/qs
12010 info build /usr/local/lib/node_modules/hoodie-cli/node_modules/insight/node_modules/request/node_modules/qs
12011 silly gunzTarPerm extractEntry index.js
12012 silly gunzTarPerm extractEntry test.js
12013 info preinstall minimist@0.0.10
12014 silly gunzTarPerm extractEntry LICENSE