Update packages versions in package.json
npm update --save
Install a new package into dependencies
npm install [pkgname] --save
# Execute gnome action as a user | |
- name: enable middle click | |
shell: "sudo -u {{ core_username.stdout }} dbus-launch gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true" | |
# Execute Gem Install using RVM | |
- name: install knife-solo | |
shell: > | |
executable=/bin/bash source /etc/profile.d/rvm.sh; | |
gem install --no-ri --no-rdoc knife-solo |
#!/bin/bash | |
for i in `ls $HOME/.vim/bundle`; do | |
echo "Update Git for $i" | |
if [ -d $i ]; then | |
cd "$i" | |
git pull | |
fi | |
cd $HOME/.vim/bundle | |
done |
#!/bin/bash | |
FILELIST=`find . -regex '\.\/[a-z]+.*'` | |
for f in $FILELIST; do | |
cat license.header $f > $f.new | |
mv $f.new $f | |
done |
# very new to node.js and express. | |
# very excited to play with server side rendering of SVG. | |
# If this simple example can be improved pls put your comments. | |
express = require('express') | |
d3 = require('d3') | |
draw_divs = -> | |
dataset = [ 5, 10, 15, 20, 25 ] |
def dict_merge(list1, list2): | |
""" Trick is to use the .__dict__ keyword. This puts all the attrs associated with | |
this library's instance are part of the mergin algorithm | |
_keys = list2.keys() | |
try _key in keys: | |
try: | |
list1[key].__dict__.update(list2[__key].__dict__) | |
except: | |
list[_key] = list2[_key] |
import re | |
from itertools import groupby | |
from collections import OrderedDict | |
# define list of interfaces | |
a = ['swp2100', 'bond12.100', 'swp22', 'br20', | |
'bond0', 'bond22', 'port-channel5'] | |
b = OrderedDict() | |
# group ports based on int name before digit |
@mock.patch('clshow.cliface.CumulusIface.print_name') | |
@mock.patch('clshow.cliface.CumulusIface.print_ip_details') | |
@mock.patch('clshow.cliface.CumulusIface.print_counters') | |
@mock.patch('clshow.cliface.CumulusIface.print_lldp_info') | |
@mock.patch('clshow.cliface.CumulusIface.print_arp') | |
def test_print_l3_access(self, | |
mock_arp, | |
mock_lldp, | |
mock_counters, | |
mock_ip, |
Update packages versions in package.json
npm update --save
Install a new package into dependencies
npm install [pkgname] --save
# virt-builder ubuntu-14.04 --size 5G --hostname cacti --root-password password:<mypassword> --format qcow2 -o cacti.qcow2
# virt-install --import --name cacti --ram 1024 --disk $HOME/imgs/cacti.qcow2,format=qcow2,bus=virtio,cache=none --os-type linux --os-variant ubuntutrusty