smallseo.info

dotfiles

Shell Config

What is a .un~ file or or why does Vim in the Terminal make the .un~ file?

I've noticed I have some dotfiles that end with .un~, for example I have a .vividchalk.vim.un~, but I'm not sure where that came from. It seems like they are created when I use Vim in the Terminal. What are these files? Can have them remove themselves when I close the file I'm editing?


Source: (StackOverflow)

In Eclipse 3.5 (and with the Aptana plugins), how do I get a view that I can use to show my project, including "dot" files?

I've managed to get the various project explorer views to show dot files, such as .htaccess, but if I ever close the project and reopen it, the dot files no longer show up in the view. Am I missing a view that lets me show the dot files or is there some kind of configuration option that I can toggle? I've tried a few things over the past few days, but I'm not sure what they were, since I really didn't keep track.

Suggestions?


Source: (StackOverflow)

show dotfiles in textmate 2?

I recently upgraded to textmate 2 and now my dotfiles are not showing up in the project drawer obviously this is important when working with stuff like .htaccess

is there a way to enable it?


Source: (StackOverflow)

Adding your .vim ~/.vimrc to github (aka dot files)

I have seen a few people that have git repos with their dot files. I'm wondering if they just

cd ~/
git init
git add .vimrc
// etc

? And then that's how they keep it up to date? Or do they probably make copies and sync them?

What strategy do you guys recommend or use? Mostly don't wanna commit and push my entire ~/

Thanks


Source: (StackOverflow)

Getting ack to search through .htaccess or other dotfiles

Is there any way to get ack to search through a file whose filename starts with a . (e.g. .htaccess), without resorting to the --all or --unrestricted options?

I've tried adding the following to my ~/.ackrc file to no avail:

--type-set=apache=.htaccess

Source: (StackOverflow)

Do dotfiles have a file extension?

Do dotfiles, such as .htaccess .gitignore and .config, have a file extension and no filename or are they considered to have a filename and no extension?


I'm trying to implement some utility functions in PHP, which is notorious for doing things wrong and I noticed that PHP's pathinfo function considers dotfiles to have a file extension and no filename, whereas node's path.extname considers dotfiles to have a filename and no extension.

I'm unclear as to whether a standard exists, or whether this amounts to developer preference.


Source: (StackOverflow)

How can I grep hidden files?

I am searching through a git repository and would like to include the .git folder.

grep does not include this folder if I run

grep -r search *

What would be a grep command to include this folder?


Source: (StackOverflow)

What's the difference between Git ignoring directory and directory/*?

I'm confused about what's the correct way to ignore the contents of a directory in git.

Assume I have the following directory structure:

my_project  
     |--www  
         |--1.txt  
         |--2.txt
     |--.gitignore

What's the difference between putting this:

www

And this?

www/*

The reason I'm asking this question is: In git, if a directory is empty, git won't include such empty directory in repository. So I was trying the solution that is add an extra .gitkeep file under the directory so that it won't be empty. When I was trying that solution, if in the .gitignore file, I write like below:

www
!*.gitkeep

It doesn't work(My intention is to ignore all contents under www but keep the directory). But if I try the following:

www/* 
!*.gitkeep

Then it works! So I think it must has some differences between the two approaches.


Source: (StackOverflow)

An executable that contains data

I've been thinking about a way to deploy configurations on a linux system, Specifically dotfiles.

I would really like to somehow compile all the dotfiles into one executable that, when executed, deploys them in the right place. Here comes the tricky part: the files are not available on the system where the executable is to be executed and I only want to 'ship' the executable. Nothing else.

Is there a way to put the files into the executable, so that they can be safely extracted later?

(I'm trying to build this in Haskell, but any language will do for the POC.))


Source: (StackOverflow)

Is there a guideline for Unix config files [closed]

Most config files are ini files (format: name=value\n). Is there any documentation or an article/guideline on this matter.

Or is anyone supposed to keep close to this format on good will?


Source: (StackOverflow)

Bash find, exclude parent?

I have a folder with some dotfiles I would like to make symlinks for. I cannot see an easy way to do this.

ls -a ~/dotfiles will include the dotfiles, but also . and ..

find ~/dotfiles -maxdepth 1 will include the dotfiles, but also ~/dotfiles


Source: (StackOverflow)

How to maintain (mostly) parallel branches with only a few difference

Scenario: I'm trying to get my unix dot-files under git. I have to work between (at least) the cygwin environment and some standard linux distros (ubuntu and opensuse), and I have files/lines of code that are only specific to, say, cygwin. Since I don't want to checkout useless files or have to deal with lots of cases inside my dotfiles, I'm creating branches for each of my environments. But most of the edits I do are common to all environments, so almost every time I made a commit I need to propagate that change to all my branches.

So basically I have several branches that are almost identical except for a few commits, and most commits I do need to be in all branches.

The question: what is the recommended git workflow for this, if there is any? Or is there a better setup (without using multiple branches?) for my scenario?

[I tried cherry-picking, but that involves quite a bit of work, and not to mention all the duplicate commits out here and the nightmare it is to keep my branches in sync.]


Source: (StackOverflow)

Is there a .mocha file where I can specify defaults such as --no-colors?

I'd like to set some defaults for mocha without having to type them each time. Does mocha look for a config file / dotfile anywhere, as jshint looks for .jshintrc and npm looks for package.json?


Source: (StackOverflow)

Can I include sub-config files in my mercurial .hgrc?

I want to keep my main .hgrc in revision control, because I have a fair amount of customization it in, but I want to have different author names depending on which machine I'm using (work, home, &c.).

The way I'd do this in a bash script is to source a host-local bash script that is ignored by Mercurial, but I'm not sure how to do this in the config file format Mercurial uses.


Source: (StackOverflow)

How to use Github to manage dotfiles?

I stored my dotfiles in github, with lots pains, because of no automation. I have to update it myself.

Is there a way that can auto install/update/sync dotfiles? I mean in a fresh server, I download dotfiles and exec a install script to copy dotfiles to local. After some time, I can exec a updateToRemote script to push local changes to remote repo, and on another server, I can exec a updateToLocal script to pull remote changes to local.

Something like that.


Source: (StackOverflow)