From 3adadcfc1a15a0f9260ca13dbb30a3470890732a Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 8 Sep 2012 14:24:18 -0400 Subject: [PATCH] a couple of new example files. one is my java formatting style for eclipse, and the other is a technique for switching users once one is already running as sudo. --- .../java_style-fredstyle_2012_09_07.xml | 291 ++++++++++++++++++ examples/os_related/user_sudoing.sh | 13 + 2 files changed, 304 insertions(+) create mode 100644 examples/eclipse/java_style-fredstyle_2012_09_07.xml create mode 100644 examples/os_related/user_sudoing.sh diff --git a/examples/eclipse/java_style-fredstyle_2012_09_07.xml b/examples/eclipse/java_style-fredstyle_2012_09_07.xml new file mode 100644 index 00000000..8aafea0e --- /dev/null +++ b/examples/eclipse/java_style-fredstyle_2012_09_07.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/os_related/user_sudoing.sh b/examples/os_related/user_sudoing.sh new file mode 100644 index 00000000..4f12ed73 --- /dev/null +++ b/examples/os_related/user_sudoing.sh @@ -0,0 +1,13 @@ + +# if this script is run as sudo, then at some point it may be useful to become another +# user, in order to run something from within their context. this is one way to do it +# with a semi-interactive set of steps... +sudo -u chronical bash <