I've been looking through various pages on this site and others looking for a way to execute a script on shutdown and restart, but none of them are working for me.   I've tried placing bash scripts in /etc/init.d/ and linking them to /etc/rc0.d/ and /etc/rc6.d/, but they won't run on shutdown or restart. I've also tried using the update-rc.d command to create new services, but    they don't work, and  they don't even create a new link in the rc?.d folders.
I have a machine running a couple of vagrant VM. The problem I have is that sometimes I forget to shutdown those VM before I shutdown or reboot my machine. Because of that my machine get stuck with this message: waiting for vboxnet0 to become free  I searched about solutions and I found this page :    I tried what they for shutdown, but it doesn't work.  I wrote an sh file for that command:  #!/bin/bash  cd ~/workspace/git/mediaservice vagrant halt   any suggestions?
Local html file AJAX Call and jQuery Woes Word or expression for a constituent that perfectly exemplifies the whole Suppose that  (1990) is considered appalling, but you can't put your finger on exactly why, mainly because there are a plethora of reasons, most of which you lack the training/education/expertise to comment in-depth on (e.g. the writing, directing, editing etc.), so you use what you consider to be a disastrous moment/scene as an example, and think "this pretty much sums it up", for example , what would you call a scene like that? A single word or expression is satisfactory.  As an example:     "The Godfather 3 is so bad, for so many reasons, but here is a ______ that perfectly represents everything wrong with the movie."   An expression is also acceptable, and the example I gave is flexible (doesn't have to be structured as it is in the example). Save site as template using client object model I am trying to make a pirate ship and am trying to attach rope to the sails. my rope is made using a path, and soft body physics. I can not find a way to attach my rope to the sail. and I can not use pinned vertices because this is not a cloth modifier. Weird behavior when overriding gnome alert styling? After playing around with the i3 tiling window manager, I had my fill and decided to uninstall it and continue using gnome. However, to my dismay, something in i3 overrode the default gnome alert box. For example, when connecting to wifi, I get a gray or blue box instead of the nice ubuntu popups. The screenshot says it all. Any ideas?    (See top right corner) Indirect return of all elements in an array The Bash man page describes use of ${!a} to return the contents of the variable whose name is the contents of a (a level of indirection).  I'd like to know how to return all elements in an array using this, i.e.,  a=(one two three) echo ${a[*]}   returns  one two three   I would like for:  b=a echo ${!b[*]}   to return the same.  Unfortunately, it doesn't, but returns 0 instead.  Update  Given the replies, I now realise that my example was too simple, since of course, something like:  b=("${a[@]}")   Will achieve exactly what I said I needed.  So, here's what I was trying to do:  LIST_lys=(lys1 lys2) LIST_diaspar=(diaspar1 diaspar2)  whichone=$1   # 'lys' or 'diaspar'  _LIST=LIST_$whichone LIST=${!_LIST[*]}   Of course, carefully reading the Bash man page shows that this won't work as expected because the last line simply returns the indices of the "array" $_LIST (not an array at all).  In any case, the following should do the job (as pointed out):  LIST=($(eval echo \${$_LIST[*]}))   or ... (the route that I went, eventually):  LIST_lys="lys1 lys2" ... LIST=(${!_LIST})   Assuming, of course, that elements don't contain whitespace. Installing Maya on Ubuntu Linux Installing Autodesk Maya on Ubuntu is possible, but can be a bit challenging.  Assuming that one already has the required specs and a solid graphics card driver installed, how can it be done? Are taglines & signatures disallowed? I recently had a number of my valid answers voted down because people objected to the fact that I added a tagline to the end. The answers were correct for the questions asked and the downvotes were only due to the tagline regarding hiring, which said:     We're hiring! Developers and QA in Washington, DC area (or looking to relocate) should send resumes to careers@example.com.   Are taglines and signatures disallowed?     For more information, see "" in the . How do I handle the window close event in Tkinter? How do I handle the window close event (user clicking the 'X' button) in a Python Tkinter program? Does Facebook allow a user to give my app access to their friends email addresses? What is the most portable method of launching a terminal emulator? Inspired exercise Sheet from Indesign I would like to create this sheet which was made it by adobe indesign   Could someone create it with latex ?     Here's my code:  \documentclass[12pt,a4paper,twocolumn]{report} \usepackage[margin=0.5in]{geometry} \usepackage[french]{babel} \usepackage{fontspec} \usepackage{graphicx} \usepackage{amsthm,amssymb,amsfonts,mathtools} \usepackage[utf8]{inputenc} \usepackage{multicol} \usepackage{multirow} \usepackage{amssymb} \usepackage{array} \usepackage{graphicx} \setlength{\columnseprule}{0.5pt} \thispagestyle{empty} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} %%%%%%%%%%head%%%%%%%%%%%%%%%%%%%%%%% \twocolumn[    \begin{@twocolumnfalse}  \begin{center}  \fbox{\Large Exercise Sheets} \end{center}     \hrulefill \end{@twocolumnfalse}   ]  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \fbox{ Exercise $1$:}\\  Compute the following limits \begin{multicols}{2} \begin{enumerate} \item $\lim_{x\to 2}\dfrac{4x^{3}-5x-22}{x^{2}-x-2}$ \item $\lim_{x\to 0^{+}}\dfrac{x-\sqrt{x}}{x+\sqrt{x}}$ \item $\lim_{x\to 1}\dfrac{\sqrt{x+3}+\sqrt{x}-3}{x-1}$ \item $\lim_{x\to 2}\dfrac{x^{2}\sqrt{x+2}-8}{4-x^{2}}$ \end{enumerate} \end{multicols}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fbox{ Exercise $2$:}\\ Let $n\in\mathbb{N}^{*}$ \begin{enumerate}     \item calculate : ${\displaystyle \lim_{x\to 0}\dfrac{1-\cos(x)\cos(2x)\ldots+\cos(nx)}{x^2} }$     \item b     \item c     \item d     \item e     \item f \end{enumerate} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document} N circles in the plane Environment variables when run with 'sudo' Get exit status of process that's piped to another I have two processes foo and bar, connected with a pipe:  $ foo | bar   bar always exits 0; I'm interested in the exit code of foo. Is there any way to get at it? How do I study the "correlation" between a continuous variable and a categorical variable? Some irreducible character separates elements in different conjugacy classes Let $x$ and $y$ be elements that are not conjugate in $G$.  Then there is some irreducible character $\chi$ such that $\chi(x) \not = \chi(y)$.   Clearly the "irreducible" part isn't important, since any character can be written as the sum of irreducible characters, but I'm having trouble going beyond that.  I'd appreciate a good hint over a full answer, and I'd be most interested in a way to construct a group representation $\varphi:G \to GL(V)$ of $G$ such that the character of the representation takes different values on $x$ and $y$. I am preparing a paper in the field of Computer Science.  In order to report test results, we usually run a number of tests and report the average of those tests.  For each test, we generate random data.  Because of the randomness, at some points, the results may come out not as expected.  For instance, a graph may be like:   Usually, one should explain why on points 8, 11 and 12 there is a decrease on the plot. Probably, it is because of that randomness.  Not hand-crafting all the graph, but just manipulating a few points makes the graph acceptable:   Since three weeks or so, I work my ass off and try to figure out why my resulting graph looks like the first one. Sometimes I feel like yielding to temptation and just modify the raw data before I go crazy.  I believe, at this point the title became misleading, so let me make it clear:  I am not seeking an advice on data manipulation. I will not manipulate my data. However, I ask to myself "how the hell this can be detected?"  And now, I don't only ask to myself, but to whole community. How is this detected? For editors, referees out there, have you ever detected something like this? unable to reset root password of mysql How best to sum up lots of floating point numbers?