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 'etc' | |
def as_user(user, &block) | |
# Find the user in the password database. | |
u = (user.is_a? Integer) ? Etc.getpwuid(user) : Etc.getpwnam(user) | |
# Fork the child process. Process.fork will run a given block of code | |
# in the child process. | |
Process.fork do | |
# We're in the child. Set the process's user ID. |
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
// ========================================================================== | |
// Project: CamUi - mainPage | |
// Copyright: ©2010 My Company, Inc. | |
// ========================================================================== | |
/*globals CamUi */ | |
ControlPanelView = SC.StackedView.extend({ | |
childViews: 'axialCmdButtons axisSelectionLabel axisSelectionRadio momementModeLabel movementModeRadio feedrateLabel feedrateSlider'.w(), | |
useStaticLayout: YES, | |