“Safe ways to do things in bash” is yet another guide to some of the best practices for writing bash scripts. It covers all the usual bits of quoting, escaping, error handling, and more.
Category: Technology
I work in technology sector. And I do round a clock, not only from 9 to 5. It is my bread and butter, it is my hobby, it is the fascination of my life. And with the current rate of change particular in information technology (IT), there is always something new to learn, to try, to talk about. I often post news, thoughts, and reviews. And when I do, this is the category I use.
15 Tips to Enhance your Github Flow
“15 Tips to Enhance your Github Flow” has lots and lots of good advice for anyone working with GitHub. Tips vary from PR templates all the way to automated dependency management and updates. Really useful!
Capture and Report JavaScript Errors with window.onerror
“Capture and Report JavaScript Errors with window.onerror” tutorial shows an easy way to capture, log and troubleshoot client-side errors:
onerror is a special browser event that fires whenever an uncaught JavaScript errorhas been thrown. It’s one of the easiest ways to log client-side errors and report them to your servers. It’s also one of the major mechanisms by which Sentry’s client JavaScript integration (raven-js) works.
window.onerror = function(msg, url, lineNo, columnNo, error) {
// ... handle error ...
return false;
}
GLWTPL – Good Luck With That Public License
GLWTPL is awesome!
GLWT Public License
Copyright (c) Everyone, except AuthorThe author has absolutely no clue what the code in this project does.
It might just work or not, there is no third option.Everyone is permitted to copy, distribute, modify, merge, sell, publish, sublicense or whatever they want with this software but at their OWN RISK.
GOOD LUCK WITH THAT PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A TRACE TO TRACK THE AUTHOR of the original product to blame for or held responsible.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Good luck and Godspeed.
Reboot and wait for reboot to complete in Ansible playbook
Jeff Geerling shares a handy tip on how to implement the configure-reboot-configure pattern in an Ansible playbook.
---
- name: Do something that requires a reboot when it results in a change.
...
register: task_result
- name: Reboot immediately if there was a change.
shell: "sleep 5 && reboot"
async: 1
poll: 0
when: task_result is changed
- name: Wait for the reboot to complete if there was a change.
wait_for_connection:
connect_timeout: 20
sleep: 5
delay: 5
timeout: 300
when: task_result is changed
...
