Hacker News new | past | comments | ask | show | jobs | submit | anh79's comments login

When I prepared my master thesis some years ago, I needed to extract parts of the main materials to build another small book that contained only the main ideas, theorems and proof highlights. \LaTeX and it's programming interface really helped as I could define a new environment for example

\begin{shipboth} contents for both thesis and the small book \end{shipboth}

This is an example of making things DRY. How can I do the same with Markdown (and their tools)?

(Well I rarely use \LaTex today; my R\'esum\'e was typeset in \LaTeX and it helped me to get a good job but when it has so many things I just write them in a .odt file)


Can you give some example? I have tried some registrars and if you don't provide some NS information, the default NS information is used.

I have a tool in the past https://gist.github.com/icy/b30893cecc8ec657317ba93831b0fd4a... it works fine as I experience. The tool has option `--all` to check by using both google/open dns. E.g,

  $ whoisvn google-is-good.com --all
      opendns.org:   google-is-good.com   available
        googledns:   google-is-good.com   available
  
  $ whoisvn google-is-bad.com --all
      opendns.org:    google-is-bad.com   available
        googledns:    google-is-bad.com   available


Look at, for example, "nmu360.se". It is registered, but has no name servers configured.


Whois says it has no name server (what a weird format that of .se), but digg finds an A record with 92.242.140.20 (what seems to be a register IP).


Let me guess: Your ISP is injecting fake DNS responses.


   echo nmu360.se|exec nc -vvn 91.226.37.83 43


Very good example. Thanks a lot.


whois may not work if you don't have correct configuration (e.g, whois server for some special domains .info, .social, ...)


Use a proper whois command which has all this configured. Note: may be difficult to achieve on macOS.


It's even hard on Linux machine. How do you know all whois servers for different top level domains? for .info, for .social, for .in, bla bla. In 2016 it's so painful to set up correct whois monitoring at my company . (May be it's a lot better now.)


apt install whois


hi Kalmar,

Is it possible to query information directly from a state file? Some interpolation would help. I ask this because I often refer to resource information from another project, and I don't see that modules are helpful.

I posted my work-around here [1] some days ago . The real code was not there because I haven't had permission for my company, but it's very short and easy to write by anyone.

Thanks for your reading.

[1] https://github.com/icy/oops/blob/master/terraform/problem_1_...



The perfect thing of Wordpress is that it really helps to upgrade from (very) older version to the new one.

Yah, some months ago I upgraded a wordpress 2.3.3 (released in 2008, http://codex.wordpress.org/Version_2.3.3) to version 4.1 :) I only needed to fix some minor problems!

I will wait 5 years from now to see if I can move from this 4.1 to another one. Sorry Wordpress 4.3 ;)


Actually since 4.something you can enable "auto-updates", and it will keep itself up to date.

I wouldn't suggest keeping in client machine on an older release, much less on a 2,3,4 or 5 year old release as you suggest, and leaving it in 2.3.3 until now is downright criminal with all the security fixes that have come out since then.


Wordpress ecosystem has many security issues. So upgrading doesn't mean it's secure. So I run my wordpress on laptop, compile all things to static contents thanks to httrack , and publish those static contents. No more nightmare, and the speed is amazing.

Of course, there is no more comments and dynamic contents. But I don't care ;)


I'm thinking of putting S3 behind a Cloudflare set up, and use "Always online" feature of Cloudflare.

Sound goods? (Woh, as long as Cloudflare doesn't have any SSL issue :D)


I think this would be a pretty good approach, especially when combined with the author's strategy.


I imagine you'd have to implement some sort of cache priming as well?


Congratulations!

It seems the memory issue with "docker" daemon hasn't been admitted/resolved. (See https://github.com/docker/docker/releases/tag/v1.8.0)

In all of my deployments, "docker" daemon memory keeps increasing. The worst case is 37% in a 512MB instance in Digital Ocean. Then docker daemon crashes...

That's to say, congratulate but I don't really want to upgrade ... :(


Memory issues can be caused by a number of things. There's been a lot of work done to improve some leakages around the logging -- both by being able to disable logging if you don't need it or switch to a different logger, and general improvements to the default jsonlog logger.

There's also been a known issue around creating lots of `docker exec` instances and those references not being released (so you can query for status later), this is also resolved.

It would be awesome if you could profile it and submit a bug report with how you are using docker and where you are seeing memory growth. Let me know how I can help so we can get this resolved.


Hi @cpuguy83,

Thanks for your feedback. I couldn't gather enough information for bug reporting (But I had few rich logs that told "docker" has invalid memory access.)

As a work-around, I use a special patch of docker-compose that helps the containers to restart automatically when "docker" daemon restarts :)

> There's also been a known issue around creating lots of `docker exec` instances and those references not being released (so you can query for status later), this is also resolved.

Woh, this seems my case, though I am not sure about "releasing" (We run "exec" and "exit"; we don't hold any "exec" for longer than 2 seconds.) I haven't seen this mentioned in changelog (FIXME). Let me try again in ticket system!


Yes, it's docker that was holding on to these exec instances (and cluttering up the `docker inspect` output if you do a bunch). We now do GC on these.

ps, you can add `reastart: always` to your compose file, and docker daemon will automatically restart those containers for you.


Thanks a lot. I wonder why this is not mentioned in the changelog :)

Regarding the `docker-compose` issue, it's described here https://github.com/docker/compose/pull/1723 . Aanand Prasad has a better PR in https://github.com/docker/compose/pull/1754 (merged).


Bash is good as a system shell. For interactive shell, zsh/fish/... wins.

That's why I only learn Bash. One lesson for everything for both purposes ;)


Programmer time is better spent learning almost any language other than bash. My god, the centuries wasted on minutiae like the stupid "[ is a program, that's why you have to put spaces around it."

And system administrators should use Ruby if given a choice.


fish would be better than bash as a system shell as well. More consistent, for example. However, bash is available and usually preinstalled everywhere, in contrast to fish.


I agree. But "fish" is quite strange to me, especially its way to recall history. In "Bash", I can type "^ R" and browser the history very fast. In "fish", I have to type and select with up/down array; it's not easy to browser the history randomly (FIXME).

My #Bash" history has > 96k entries (woh, believe it or not; because of this too big number, "xterm" + "screen" always stuck when exitting; but "urxvt" + "tmux" work perfectly thanks to "urxvt" daemon mode.)

Porting this huge history database from my daily "bash" to "fish" is just a nightmare ... :D


Actually fish will import your ~/.bash_history automatically!


(Talking about interactive "fish" shell; but that's the point: I need to be familiar with its interative mode first.)



Some of these are programmer errors though. Quote everything is known best practice for bash, vim lints unquoted variable expansion as red. Also bash scripts frequently interact with the FS so it's no surprise that some bugs remove files that are not meant to be removed. I think "set -o nounset" would stop the RHEL bug, although it's not clear if the variable is unset or really just an empty string.

I don't want to protect bash though, but teaching bash scripting best practices would be nice. I learned these options from this site:

http://kvz.io/blog/2013/11/21/bash-best-practices/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: