Consul configuration in a multi Data Center environment Below I am going to describe how to use Consul Health Checking across Multiple Data Centers. A picture is worth a thousand words, the diagram below describes a high level overview of the Consul multi Data Center architecture. Consul Multi Data Center Diagram below are the highlights […]
Category: Uncategorized
New IP Subnet IETF draft – IP-FF / “Five Fields”
Very interesting – just found this IETF draft – IP-FF / “Five Fields” Below is some of the befits of the new so called Five Fields (IP-FF) A new IP Schema – Internet Protocol “Five Fields” Main highlights: -Short, human readable addresses, with IPv4 look & feel, like this: 192.168.510.971.11 10.0.0.0.1 382.201.769.25.133 Where each field […]
Git auto complete and color coding
First lets get the auto completed code
1 |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash |
Now add to your .bashrc or .bash_profile
1 2 3 |
if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi |
To enable Git color coding
1 2 |
git config color.ui git config --global color.ui true |
Pulseaudio (PCM) Gnome 3 issues
Solution for no sound
1 2 3 4 5 6 7 8 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1206764 /root/.pulse/client.conf autospawn = yes # OK, I guess we can consider that a regression in autostart behavior, I'll re-add # Add /usr/bin/pulseaudio --start "$@" # to /usr/bin/start-pulseaudio-x11 script |
You can start (or restart with pkill pulseaudio)
1 |
/usr/bin/amd64/pulseaudio --start --log-target=syslog |
Note: All settings are in
1 |
/etc/pulse/default.pa |
Helpful links PulseAudio Examples
BDA python 2.6 and ipython install
easy_install pip pip install ipython
Using NodeJS With MongoDB
Configuring MongoDB First test and connect to mongo From connect line
1 2 3 4 5 6 7 8 9 10 11 12 13 |
> use mcfly switched to db mcfly > db.createCollection('mathpeeps') { "ok" : 1 } > db.mathpeeps.insert({Firstname: 'Eli', lastname: 'Kleinman'}) WriteResult({ "nInserted" : 1 }) > db.mathpeeps.insert({Firstname: 'Moshe', lastname: 'Kleinman'}) WriteResult({ "nInserted" : 1 }) > db.mathpeeps.find() { "_id" : ObjectId("55ce19e7737e49e3a5a7553e"), "Firstname" : "Eli", "lastname" : "Kleinman" } { "_id" : ObjectId("55ce19eb737e49e3a5a7553f"), "Firstname" : "Moshe", "lastname" : "Kleinman" } > bye |
Using NodeJS and mongodb driver
1 |
npm install mongodb |
Creating the javascript file fro mongodb driver
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
var mongodb = require('mongodb'); var db = new mongodb.Db('mcfly', new mongodb.Server('127.0.0.1', 27017), {safe: true}); db.open(function (err) { db.collection('mathpeeps', function (err, collection) { /* // Lookup all item collection.find().toArray(function(err, items) { console.dir(items); //to exit after search process.exit(); }); // Lookup single item collection.findOne({lastname: 'Kleinman'}, function (err, item) { console.log('found the item as:'); console.dir(item); process.exit(); }); */ // Update record collection.update({lastname: 'Kleinman'}, {$set: {middlename: 'gimpple'}}, function (err) { }); collection.findOne({lastname: 'Kleinman'}, function (err, item) { console.log('found the item as:'); console.dir(item); process.exit(); }); }); }); |
Cassandra install reference
Casandra references http://docs.datastax.com/en/datastax_enterprise/4.7/datastax_enterprise/install/installGUI.html https://www.digitalocean.com/community/tutorials/how-to-configure-a-multi-node-cluster-with-cassandra-on-a-ubuntu-vps
javascript sparklines
http://benpickles.github.io/peity/ omnipotent.net/jquery.sparkline
Hw to make lightning google calendar
In the current version (0.18 with lightning 1.9.1), this is a hidden feature which is disabled by default. It is slightly buggy, but works sufficiently to just get an invitation into your google calendar from your (possibly non-google) inbox. Using the config editor, simply set calendar.google.enableEmailInvitations to true. You may also want to set calendar.google.sendEventNotifications […]
how to set informix timeout
export varible #before start Let it wait, even it times out it will complete.