This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo aptitude -y install smbfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mount //host-2.blah.net/c\$ host-2.blah.net -ouser=Administrator,password=ca\$hc0w |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service mgmt-vmware restart # Restart hostd | |
service vmware-vpxa restart # Restart vpxa | |
rpm -qa | grep vpxa | xargs rpm -e # Uninstall vpxa (allowing it to be auto-installed again) | |
# Check the state of Intel VT/AMD-V on a host: | |
# 0 – VT/AMD-V indicates that support is not available in this hardware. | |
# 1 – VT/AMD-V indicates that VT and AMD-V might be available but they are not supported in this hardware. | |
# 2 – VT/AMD-V indicates that VT and AMD-V are available but are currently not enabled. | |
# 3 – VT/AMD-V indicates that VT and AMD-V are enabled in the BIOS and can be used. | |
esxcfg-info|grep HV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thread' | |
semaphore = Mutex.new | |
a = Thread.new { | |
semaphore.synchronize { | |
# access shared resource | |
} | |
} | |
b = Thread.new { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/cygdrive/c/Program\ Files/VMware/VMware\ View/Server/tools/bin/vdmadmin.exe -L -d bn-1 -m bn-1-1 -u vdi2.net\\vp-user-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r | grep -v master | awk -F / '{print $2}' | tr '\n' ' ' | xargs git push origin --delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Three ways of creating an event bus in backbone | |
var marionetteVent = new Marionette.EventAggregator(); | |
var backboneVent = new Backbone.Wreqr.EventAggregator(); | |
var vent = _.extend({object}, Backbone.Events); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parentView.js | |
updateData: function() { | |
this.data.update(); | |
pageEventBus.trigger('dataUpdated'); | |
} | |
// childView.js | |
initialize: function() { | |
this.listenTo(pageEventBus, 'dataUpdated', this.handleDataUpdate); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parentView.js | |
updateData: function() { | |
this.data.update(); | |
this.childView.render(); | |
} | |
// no addition needed in childView.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Handling an event with on | |
pageEventBus.on('advancedModeSelected', this.switchToAdvancedMode, this); | |
// Handling the same event with listenTo (preferred) | |
this.listenTo(pageEventBus, 'advancedModeSelected', this.switchToAdvancedMode); |
OlderNewer