Posts

Dynamic DNS and OpenDNS on the vyatta box

Vyatta has problems with sending the ddclient traffic to OpenDNS on the same interface that it is updated. This means that the network identity in the OpenDNS dashboard is unreliable, and we get a lot of errors in the Vyatta logs. The workaround is to disable dynamic DNS configuration in Vyatta, and use a script based on cUrl. cUrl is like Wget, for downloading URLs, and it can be forced to use a specific interface. Steps to install: 1. Download the opendns_updater.sh script, and put it in /usr/local/bin/ on Vyatta. Make sure you update the username and password! Make it executable with chmod +x /usr/local/bin/opendns_updater.sh For convenience, I created one more script, opendns_update_all.sh, with this content, for example you have 5 Internet lines: #!/bin/bash /usr/local/bin/opendns_updater.sh <interface1> <Network Identity 1> /usr/local/bin/opendns_updater.sh <interface2> <Network Identity 2> /usr/local/bin/opendns_updater.sh <interf...

The fastest way to delete large file(s) on Linux

Go to the container directory and run this command: perl -e 'for(<*>){((stat)[9]<(unlink))}'

Education & Learning

“Education is something that is done to you. Learning is something you do for yourself.” ~Joi Ito.

Don't forget rule #6

What is rule #6? "Don't take yourself so seriously." ~ Seth Godin 's Leadership Workshop .

Apply DNS to all the Linux servers (minions) using SaltStack

Okey, let's say you want to change nameserver preferences of about 25 Linux servers. You can do it one by one or take a breath and try SaltStack. 1. In your salt master, create a folder name dns ( /srv/salt/dns ) 2. In /srv/salt/dns/ create: * init.sls : /etc/resolv.conf:   file.managed:     - source: salt://dns/resolv.conf     - user: root     - group: root     - mode: 644     - template: jinja /etc/resolvconf/resolv.conf.d/original:   file.managed:     - source: salt://dns/original     - user: root     - group: root     - mode: 644     - template: jinja * resolv.conf : # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver my.dns.server1 nameserver my.dns.server2 search my.domain.com * original : search my.domain.com nameserver...

MindTouch Core - Fix the Page-Restriction functionality

A couple months ago when I was trying to made a responsive theme for my MindTouch wiki (dekiwiki opensourced version) using BootStrap, I broke the page-restriction functionality for some reasons. In details, It's the " Add to list " button. When I clicked it, the selected user/group did not appear under the " Permission list " list. After looking into the core for a while, I finally made it work again. Simply as following: 1. Open the special_pagerestrictions.php file (at /path/to/your/dekiwiki/deki/plugins/special_page/special_pagerestrictions/ ) using nano or any text editor you like 2. Modify this code block with the red line: var itemSelectHandler = function(sType, aArgs) {         var oAcInstance = aArgs[0];         var oData = aArgs[2];           if ( oData && oData[0] )         {                 oAcInstance._elTextbox.value = Deki.$.h...

edx-platform - How to make SMTP work on your Open EdX instance the proper way

There were several threads in the Open EdX mailing list asking about how to make the email working. But, it seams like there is no proper instructions out there to help people. So, I decided to write something about that. Firstly, there are 3 simple things to keep in mind: All the authentication information should be kept privately. If you add them to the edx-platform source files there will be conflicts when you upgrade or pull from master/branches. So, the best place to keep all the settings for all your Open edX applications is /edx/app/edx_ansible/server-vars.yml .  0. Checkout all of your modification on: (to avoid source code conflicts) cms/envs/common.py lms/envs/aws.py cms.env.json cms.auth.json lms.env.json lms.auth.json 1. Create  server-vars.yml   in  / edx/app/edx_ansible/ 2. Add these following variables to server-vars.yml with your SMTP information: EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends. smtp.EmailBackend' EDXAPP_EMAIL_HOST: '...