Script/Configuration files organization

Just for a curiosity matter, how do you organize your files?
I use a formatting for my configuration files and scripts like this ( Takes too much time to comment like that ):
#---[ Aliases ]---
alias ls='ls --color=auto'
#+++[ Aliases ]+++
#---[ System settings ]---
limit -s coredumpsize 0
umask 0027
#---[ ZSH Options ]---
#---Directory---
# AUTO_CD peform cd if a directory name is given
# AUTO_PUSHD cd push the old directory onto the directory stack
# CD_ABLE_VARS expand text (if not a command nor a directory in PWD) to ~/text
# PUSH_IGNORE_DUPS prohibit duplicate directories in the directory stack
# PUSHD_SILENT do not print directory stack after pushd popd
# PUSHD_TO_HOME 'pushd' acts like 'pushd $HOME'
setopt AUTO_CD AUTO_PUSHD CD_ABLE_VARS PUSHD_IGNORE_DUPS PUSHD_SILENT PUSHD_TO_HOME
#+++Directory+++
#---Completion---
# ALWAYS_TO_END moves the cursor to the end of the command
# AUTO_LIST automatcally list choices on ambiguity
# AUTO_PARAM_SLASH
# NO_LIST_BEEP no beeping
setopt ALWAYS_TO_END AUTO_LIST NO_LIST_BEEP
#+++Completion+++
EDIT: Does anyone have vim macros to do that?
Last edited by hack.augusto (2008-11-27 21:31:37)

Did you mean something like this?
Premacro:
my section title*curser is here*
Postmacro:
#---my section title---
*curser is here*
#+++my section title+++
If thats what you meant than this should do it..
I#<Esc>yyp3a+<Esc>3A+<Esc>k3A-<Esc>03a-<Esc>o<Esc>
You can map that to a key using the syntax below (in this case the key is ';')
:map ; I#<Esc>yyp3a+<Esc>3A+<Esc>k3A-<Esc>03a-<Esc>o<Esc>
After doing the above,  you just type the section title, hit esc, then hit ';' and you'll have your pre/post comments.
If you take out the last <Esc> you'll be left in insert mode rather than command mode.
EDIT: Vim folding might useful to you.. allowing you to collapse/expand sections. (I don't use it much.. so dunno how well it works..)
Last edited by sabooky (2008-11-28 06:36:14)

Similar Messages

  • SCCM 2012 r2 - deploy aplication with script/configuration file

    hello,
    I'm trying to install an application with a file that copies the basic configurations of the application.
    I've done this:
    step 1:
    create a aplication by msi
    step 2:
    create the script copy defs 
    "if not exist "C:\Users\Default\AppData\Roaming\OpenOffice\4\user\registrymodifications.xcu" goto startdefault
    goto verica_conf_user
    :startdefault
    xcopy /d /y /e "\\server\REMINST\Source\OSD\Aplications\LibreOffice\4.2.4\Confs\Users\*.*" "c:\Users\"
    :verica_conf_user
    if not exist "%appdata%\LibreOffice\4\user\registrymodifications.xcu" goto startuser
    exit
    :startuser
    xcopy /d /y "\\server\REMINST\Source\OSD\Aplications\LibreOffice\4.2.4\Confs\registrymodifications.xcu" "%appdata%\LibreOffice\4\user\"
    step 3:
    in aplication properties on the "deployment types" tab add the following:
    step 4:
    step 5
    after deploy the aplication i get the error  0x87D00324(-2016410844)
    can you please help'me?

    xcopy /d /y "\\server\REMINST\Source\OSD\Aplications\LibreOffice\4.2.4\Confs\registrymodifications.xcu" "%appdata%\LibreOffice\4\user\"
    Reminst is the default share of WDS and it's not the best idea to place other files in there (if that is the same REMINST though). Plus it bypasses the use of DPs (content might get downloaded to the cache, will sit there unused, but the script copies the
    same content from a UNC share).
    Only one deployment type will be executed in the application model.
    0x87D00324 = The application was not detected after installation completed. So double check the detection method.
    Torsten Meringer | http://www.mssccmfaq.de

  • Delete save configuration files in /configuration folder

    How to delete the historic stored (generated by our ssh script) configuration files in /configuration folder on Ironport appliance? thanks.
    Leo

    FTP to the box and delete them...
    V:\>ftp esa
    Connected to esa.opus.corp.root.
    220 esa1.opus-group.com Cisco IronPort FTP server (V8.5.6) ready
    User (esa.opus.corp.root:(none)): admin
    331 Password required.
    Password:
    230 Login successful.
    ftp> cd /configuration
    250 CWD command successful
    ftp> prompt off
    Interactive mode Off .
    ftp> mdelete *.xml                                   <----you may want to change what you're deleteing.
    200 Type set to ASCII.
    250 DELE command successful.
    250 DELE command successful.
    250 DELE command successful.
    ftp>

  • Reading Encrypted Password from Configuration File and Decrypt it at login

    Hi All,
    My application reads a configuration file to connect to the ORACLE database. The values defined for password are clear text as given below:
    user: 'mh'
    password='abcd1234'
    Is there is any way I can give an encrypted password in the configuration file instead of a clear text file and at the time of login ORACLE decrypts it. I am using ORACLE 11g Database.
    My company have a requirement that passwords are not stored in the clear in properties files. the reason being I suppose that if the password is stored in plaintext someone could hit the property file directly, get the password and then connect to the database with it.
    For a regular user connecting through an Oracle client or SQL Developer they would need to have the plaintext password in order to connect.
    its based on the requirements of
    International Standards Organization Guidance
    ISO 17799 � 9.5.4 requires password management systems to:
    � enforce the use of individual passwords
    � allow users to select and change their own passwords if appropriate
    � enforce a choice of quality passwords
    � force regular changes of passwords
    � maintain a record of previous user passwords to prevent re-use
    � not display passwords when they are being entered
    � store password files separately from application system data
    � store passwords in encrypted form using a one way encryption algorithm
    � alter default vendor passwords following installation of software
    So if I can store the password encrypted using a one way algorithm then hacker/user couldn't decrypt it and then access the database.
    I have feeling there is a way of configuring this in Oracle advanced Security, but just can't quite get it to work.
    Edited by: user5568473 on 20-May-2013 00:05

    So if I can store the password encrypted using a one way algorithm then hacker/user couldn't decrypt it and then access the database.... and neither can your application. Encryption is needed in this case. The decryption must be written into your application. I've written my own in some cases, but finding a library for your development language is a smarter solution.
    One alternative is using an Oracle wallet. It doesn't fit every circumstance and does have some maintenance headaches.
    You can set up a basic secure password store to encrypt and store the password for a given user@instance combination, and then connect to the database without passing a password. SQL*Net adds in the appropriate password from the wallet for when you connect.
    http://www.oracle.com/technetwork/database/security/twp-db-security-secure-ext-pwd-stor-133399.pdf
    Advanced Security Option also allows you to set up a Public Key Infrastructure connections (SSL encryption and/or authentication). It also uses a wallet to store the SSL certificates and credentials. I don't have personal experience on this approach.
    SSL and the wallet allow you to connect to the database similar to CONNECT/@net_service_name or sqlplus /@net_service_namehttp://docs.oracle.com/cd/B28359_01/network.111/b28530/asossl.htm#CIHCBIEG

  • Best practice with respect to wcf configuration files for SSIS

    So after reading a lot of posts and blogs on how to configure SSIS to read from configuration files , I am still not clear and would like any expert to provide a definitive stance. In my case the WCF service consumption is wrapped into a separate assembly.
    I am referencing the assembly in an embedded C# script within my SSIS package.
    When I make the helper class call to the webservice , I get the endpoint not found WCF exception.
    Keep in mind I am running this from VS 2012 IDE and did the following to make sure the WCF call works:
    1. Googled and found that you need to have config entries in DtsDebugHost.exe.config file. But it still did not work
    2. Had the same entries in the associated app.config file for C# script but it still did not work.
    It seems like SSIS is very fragile w.r.t consuming WCF entires in a config file. Is the best practice to just have the end point created in code and externalize the end point as a SSIS variable / xml file or is there really a way to get these config files working.
    Attached is the wcf snippet of my config file.
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="ITransactionProcessor">
    <security mode="TransportWithMessageCredential" />
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor" binding="basicHttpBinding" bindingConfiguration="ITransactionProcessor" contract="CyberSource.ITransactionProcessor" name="portXML" />
    </client>
    </system.serviceModel>
    SM

    I have the code working without use of config files. I am just disappointed that it is not working using the configuration files. That was one of the primary intents of my code re-factoring. 
     Katherine
    Xiong , If you are proposing this as an answer then does this imply that Microsoft's stance is not to use configuration files with SSIS?? Please answer.
    SM

  • A script in file EditingUtils.js has been running for a long time CS4

    I'm getting this error in dreamweaver:
    "A script in file C:\ProgramFiles\Adobe\Aobe Dreamweaver CS4\Configuration\Shared\Spry\DesignTime\EditingUtils.js has been running for a long time. Do you want to continue?"
    I get the error when I open a page that has several spry elements, even after shutting down my computer and rebooting. It has over 100 spry collapsible panels, which each have their own name, ie: var CollapsiblePanel108 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel108")
    I read that editing the parameters of a widget may cause problems for CS3, and it is resolved for CS3: http://kb2.adobe.com/cps/401/kb401257.html, but I don't know how to fix the problem for CS4.
    Any help is greatly appreciated!

    seleon04 wrote:
    I get the error when I open a page that has several spry elements, even after shutting down my computer and rebooting. It has over 100 spry collapsible panels, which each have their own name, ie: var CollapsiblePanel108 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel108")
    I think you have answered your own question. More than 100 Spry collapsible panels is not exactly what most people would call "several". It's a huge - and probably unrealistic - amount.
    I don't think there is an actual limit on the number of Spry elements that you can have on a page, but Dreamweaver uses JavaScript in the background to inspect the document and edit it. The more elements you have, the greater the processing power and memory your computer requires to handle them. It might work with a faster processor or more RAM, but I think you need to reconsider your design strategy.

  • How to create bulk configuration files from a template for staging?

    Hello,
    We have created a sample configuration for ISRG2 2901 Router.  The sample configuration is long, and with copy/paste it is possible to skip some lines, and it is difficult to ensure the configuration of every device is standardized due to this error possibility. What we are trying to achieve is first create a template from this sample configuration file, and then create configuration files for each device seperately and automatically. After creating this configuration instances, we want to be able to distribute the configuration files (and possibly the ios) to the devices during the staging phase. Since there are about 1000 2901 routers, creating configuration files is important?
    From searching we have found the following tools:
    1) CCE (Cisco Configuration Engine): This tool seems to be very efficient for distributing the created configuration files. We may use the serial number of the device, and it provides almost zero touch provisioning of the configuration files to the devices. Creating the configuration file from the template seems to be manual, i.e enter the ip addresses of the interfaces, the routing tables one by one for each device. How can we use velocity template for device configs?
    2) Ciscoworks LMS Prime: It is possible to create a baseline template for the devices, and after getting the backup configuration of the routers, it is possible to compare the actual configuration of the device with the baseline template, and understand if there is any difference with each other. This is indeed very useful in order to keep the configuration standardized, we again could not find a way to create bulk configuration files from the baseline template.
    3)  Solarwinds Config Generator: This tool is useful for creating a configuration file from a template, but again not for automatically creating configuration files, and needs manual intervention.
    4) Excel Macro: It seems that some people have achived to automatically create configuration files with using an excel macro, but we could not find a procedure or tip of how to achieving this.
    5) Pearl or TCL/TK Script: Again since we are not software developers but from networking field, it is difficult to achieve a working form of this scripts or codes due to to lack of documentation and development experience.
    So our problem comes down to creating a template from a sample configuration, and creating bulk configuration files from the template. Is there a specific tool or procedure to achive this purpose?
    Thanks in Advance,
    Best Regards,

    Hi,
    Try this one http://www.gen-it.net
    Regards,
    Stuart

  • CONFIGURE FILE ADAPTER ,get files one by one.

    HI,  I have cinfigure one system of FILE ADAPTER TO JDBC ADAPTER, is working OK, but I need to Know  how configure The FIle adapter to get files one by one from the folder , I have the channel configure between 30 seconds, but when come to look for the files has them all ... I need to get one by one the files.
    Help me... RGRDS.

    Hi ,
             What is the operating system of your PI server sytem? If its unix/linux you can achieve this using shell scripts, for windows systems you need batch files. The script/batch file would run in background continuously. It will check how many files are present in a directory (say xyz) . Then one by one transfer the files to directory(say abc)  from where PI picks up files at regular interval. you need to use "sleep()" command in script so that the script puts files after some time interval say 90 seconds. The polling interval of comm channel in PI should be set less than sleep time interval of the script.In file sender adpater configuration please set the Processing Parameters -> Processing Mode-> Delete/archive. The script before putting a file in "abc " checks presence of any files. If there are some files it goes to sleep mode for few seconds and continues checking unless "abc" is empty. Then the script moves(as we do cut and paste in windows) file in "abc" directory.
    regards
    Anupam

  • Best Practive (Regarding Configuration Files)

    I know that where you put configuration files is mostly an opinion, and we all could have different opinions.
    However I came to a point where I have a preference. I prefer puting all my configuration files inside the conf folder (including the web.xml, struts.xml, etc) and then only using the Ant Script (build.xml) would I move this files where I want. For example the web.xml would be moved to the WEB-INF folder.
    The advantege of this would be that I would have all of the configurations for my application localized in one placed, and not scatered everywhere.
    The drawback is that my build.xml file will contain some deployment information, and more lines naturally. However the firsy one should not be a problem since at the end of the day the build.xml is there to develop a build (deployable version) of your application.
    However this could be one of my most stupid post, just wanted some opinion on this.
    thanks and regards,
    sim085

    I think that solutions go great for people that know
    exactly what they are doing. For example, an expert
    can easily decide to move something from one place to
    another since he knows what advantege would that give
    him, and what repercussions.
    IMO, a good book should also describe options (and hence opportunities and pitfalls) for a source and/or deployment structure. Most probably just glance over the topic, but visiting vendor sites (say, Struts or Tapestry or Weblogic) will also give you additional ideas and constraints.
    But for myself (which still consider myself as
    experimenting) this is a little harder, since I still
    did not master the basics. At the begining I adopted
    a folder structure directly from a book I read. Only
    now I am starting to think of what could I change,
    and as you can see still have to ask some questions
    here :$ :)
    We've all been there. In fact, I'm struggling just to keep current with the technology stack I'm familiar with! :^)
    IMO standards help juniors understand better, altough
    you are right. I would not want something like
    VS.net where the editing tool take care where to put
    (nearly) everything.
    Totally agreed. But as I think you yourself have hinted at, it's a tough balance to strike.
    regards,
    sim085- Saish

  • CMDTUX_CAT:754: ERROR: error processing configuration file

    Hi Tuxedo Experts,
    I have compiled and linked sample code tuxedo client and server (simpapp). According to README, the next steps is running tmboot -y command. Does it start the simpserv tuxedo server? If not, how do I start that?
    Plus, when I ran this 'tmboot -y' command, I got the error:
    ===========================================
    $ tmboot -y
    tmboot: internal error: CMDTUX_CAT:754: ERROR: error processing configuration file
    tmboot: internal error: CMDTUX_CAT:1360: ERROR: configuration file not found
    ===========================================
    Would you please help me to resolve that.
    Thanks & Regards,
    Ahsan Asghar

    Hi Ahsan,
    You skipped some steps. One of the first steps is to set the environment variables given in the README. This is normally done by creating a script you can execute in the future, often called setenv.sh. After creating this script and executing like:
    . ./setenv.sh
    then you need to edit the sample UBBCONFIG file which for simpapp is called ubbsimple. This file contains the Tuxedo configuration information. You will need to replace the things in <> with ones appropriate for your system. The machine name should be the same as the output of the uname -n command.
    Once you've edited the file, it needs to be compiled with the tmloadcf command. Then you should be able to boot and run your application.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Configure file type association

    Every time I start up sql developer, it asks to configure file type association.
    I've selected all and gone ok, but it keeps asking, I've tried many conbinations, ie unticked them, still it asks.
    I'm running latest version under xp sp2 with up to date patches and hotfixes.
    Is there a file I can manually configure or what ??

    All the configuration option for file associations are under Preferences > File Associations.
    I am running the same windows version and service pack and have SQL Developer as my default editor for SQL scripts and haven't had any problems. Verify the check box at the very bottom with text that reads "Open with SQL Developer", have it checked.
    Ignacio

  • Reading configuration files

    I have an application that I am testing in Webstart. There are about 9 configuration files that are part of the application that need to be loaded. Because of the way the application is currenlty setup, I cannot put the config files into the main jar file. I must leave them in the directory structure (com.xxxxx.yyyyy.client.config)
    The problem is when Webstart tries to start the application, I get a bunch of Unknown Source Errors as if the app cannot see the config files. I have added them to the jnlp script with the arguement tag but I still get the error.
    Is there any way to have the jnlp file create a directory in the Webstart Cache folder, copy in these config files and have Webstart see them so the app will run.
    I think this is happening due to the FileInputStreamSource designation as opposed to the JarInputStreamSource designator but I may be wrong.
    Any help would be appreciated.
    Thanks,
    Mark

    I have an application that I am testing in Webstart.
    There are about 9 configuration files that are part of
    the application that need to be loaded. Because of the
    way the application is currenlty setup, I cannot put
    the config files into the main jar file. I must leave
    them in the directory structure
    (com.xxxxx.yyyyy.client.config)
    The problem is when Webstart tries to start the
    application, I get a bunch of Unknown Source Errors as
    if the app cannot see the config files. I have added
    them to the jnlp script with the arguement tag but I
    still get the error.
    Is there any way to have the jnlp file create a
    directory in the Webstart Cache folder, copy in these
    config files and have Webstart see them so the app
    will run.
    I think this is happening due to the
    FileInputStreamSource designation as opposed to the
    JarInputStreamSource designator but I may be wrong.
    Any help would be appreciated.
    Thanks,
    MarkHi Mark,
    I am also facing the same above problem, did you find any solution for the above problem if so please let me know.
    Regards,
    Mukesh.

  • Please help--------------Error instantiating EM configuration files

    I got the error that
    "enterprise manager configuration failed due to the following error:
    Error instantiating EM configuration files
    Refer to the log file at C:\oracle\product\10.2.0\db_1\cfgtoollogs\dbca\orcl\emConfig.log for more details.
    You can retry configuring this database with Enterprise Manager later by manually running C:\oracle\product\10.2.0\db_1\bin\emca script."
    I ran the script manually but didnt work. Then I ran script emctl.bat and it gave me following errror:
    Error: Environment variable ORACLE_SID not defined. Please define it.
    Pls note that every thing was working fine two days ago. But suddenly I can not access EM. So uninstall Oracle, delete orale directory, reinstall oracle, but still got same problem. Can any one help? (I looked at some of the questions on EE already answered, but they didnt solve my problem either)
    Note: OS is Window Vista

    finally found solusion from web, let us share it:
    http://www.scribd.com/doc/225225/Uninstalling-Oracle
    because i did clean oracle completely. this is very common problem when you delete and reinstall oracle.
    L

  • Providing configuration file for SQL 2012 Express installation which installing HPC 2012 R2

    Hi guys,
    I need to know if there is any way to provide configuration file for SQL 2012 Express installation which installing HPC 2012 R2?
    I am scripting installation on HPC 2012 R2 with default SQL 2012 Express edition but I am not able to find any option to provide a configuation file for SQL 2012 Express installaiton.
    Thanks,
    Vivs.

    Hi Vivs,
    As my understanding, you want to generate a configuration file and install SQL Server 2012 express edition using that configuration file.
    If that is the case, firstly, you could generate the configuration file following the steps below since express edition is run in AutoAdvance mode which skips "Ready to Install" page.
    1.Double-click SQL Server installation file in your local drive, you will see that the file will be extracted to a temporary folder. Please make a note of what directory it is extracted to. For example, it could be in c:\ followed by a folder name which
    will be a set of random letters and numbers "gy7h8hjhhj67rfs7".
    2.Cancel installation. Then click on the Start button on the task bar, click run, type the command cmd.exe, and go to that directory via cmd.
    3.Execute the following command: setup.exe /ACTION=INSTALL /UIMODE=Normal
    4.Follow the wizard through to the 'Ready to Install' page. The path to the configuration file is specified in the 'Ready to Install' page in the configuration file path section.
    5.Cancel the setup without actually completing the installation, to generate the INI file.
    Secondly, to install SQL Server using Command Prompt, go to the SQL Server installation media root (the temporary folder) from the command prompt and specify the ConfigurationFile.ini as a parameter as shown below.
    Setup.exe /ConfigurationFile=ConfigurationFile.INI
    For more information about the process, please refer to the article:
    http://www.mssqltips.com/sqlservertip/2511/standardize-sql-server-installations-with-configuration-files/
    Regards,
    Michelle Li

  • DB script to remove organization

    If you have a db script that removes organization and its references and could share I would appreciate it very much. (assuming all users are removed from the organization)
    I know this is not recommended.....
    Thank you

    Perhaps you have a corrupted file?
    Try running this and inspecting the output:
    Get-Content \\homedir\operator\FLASTNAMEDeviceNames.txt |
    ForEach-Object {
    Write-Host $_ -fore
    $id="na.xx.llp/Users/City/Lastname, Firstname A./ExchangeActiveSyncDevices/$_"
    Write-Host $id -fore green -back white
    Remove-ActiveSyncDevice -Identity $id -Confirm: $false
    ¯\_(ツ)_/¯
    Thank you!  Yes, the txt file containing the device name appears to have had some corruption in the form of a hidden character.  The "A" wasn't visible but it was there.  I'm just glad my script wasn't incorrect.

Maybe you are looking for

  • BI 11.1.1.5

    hello, i am ADF Developer. Heard Jdev 11.1.1.5 have v good integration with BI and new wizards. Is there a enough scope now for ADF developer be able to work on BI project with this new change ? OR is it just a small piece that got addressed. questio

  • WM process flow diagram

    Can anybody help me to get process flow diagram of any standard WMS in SAP? I appriciate your help Thanks,

  • SMS memory

    Hello, Can anyone help me with the following question. How using the SIM card memory instead of the phone memory for incoming and outgoing SMS messages. Device: Nokia C1-01 Solved! Go to Solution.

  • Quotation comparison

    Hi gurus             when comparing the prices entered  in  quotation maitenance  in me49 is there any chance of comparing price taking taxes also ie excise duty,cess ,sh cess ,vat etc into consideration. please check this scenario thanks & regards r

  • Problems upgrading from v10.5.8 to snow leopard.

    I recently purchased Mac OS X snow leopard to upgrade my v10.5.8 Macintosh computer. The computer successfully got half way through the install then automatically rebooted itself. After this happened it remained at the reboot screen indefinitely (scr