[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Where do you backup your vimrc and shell scripts?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 16
Thread images: 3

File: 1456446256289.gif (1MB, 960x540px) Image search: [Google]
1456446256289.gif
1MB, 960x540px
Where do you backup your vimrc and shell scripts?
>>
One Drive
>>
File: el.jpg (21KB, 620x420px) Image search: [Google]
el.jpg
21KB, 620x420px
>>58947845
>back up shell scripts in botnet drive
>telemetry calls are magically written into the scripts
>
curl telemetry.microsoft.com/linux64 -0o /etc/inir.d
at the end of each file

thanks, microsoft
>>
>>58947824

They are backed up with snapshots from my root lv.

They go on a NAS with RAID1 and cold storage.
>>
>>58947935

> running scripts from untrusted sources

kekkest of keks.
>>
>>58948765
>Own shellscripts backed up in botnetdrive
>It becomes untrusted
>>
>>58947824
>has all that nice high-end equipment, the pinnacle of thousands of years of evolution and ingenuity
>can't even wash his hair
This is why I hate neckbeards
>>
>>58948844
You are just jelly cause your beta cuck body cannot cannot grow beards
>>
i have a git repository and all of my dotfile configuration files (.ssh/ sans keys, .vimrc, .zshrc, etc...) are all stored in there and symlinked to wherever they need to be. backing up is fine if you never change these things, but being able to diff and revert is kind of crucial.
>>
>>58947824
on 4chan.
:highlight Normal ctermfg=Grey ctermbg=Black
:set number
:set mouse=a
>>
File: happy_cat.jpg (38KB, 240x200px) Image search: [Google]
happy_cat.jpg
38KB, 240x200px
>>58949199
I do this as well, I have a github repo of all my dotfiles (.bashrc, .vimrc, .bash_aliases). Suppose you use this to copy dotfiles on one-off servers, DO droplets, etc., then you will find that this setup has some drawbacks that you can overcome.

1. You need to change the value of $USER in each dotfile which uses that variable, and if you forget, things will actually work for a long time until you try to install something like nvm whose install script depends on some stuff in your bashrc.

2. Since programmers are constantly changing their dotfiles, you need to have a repository that is updated constantly with the dotfiles on your main machine. I guess the solution here is to put a line in your .bashrc that copies each dotfile to the repository and perhaps reminds you to push to Github.

Well that's about it. Nice to see a thread about dotfiles OP.
>>
>>58949272
for 1 you can make your code somewhat resilient to that by setting environment variables (... like $user, so maybe i'm confusing what you meant) and generating the path you need that way. the biggest hiccup i had was some shit that os x does that linux doesn't do (it was some command that i forgot, honestly), so i had to do some shitty obnoxious if else block in bash that checked what environment it was in and then acting differently based on the response. but it's not a big deal.

another alternative is to have different branches for different environments (e.g. linux, os x, etc...) but i ditched that approach really quick. it was just a mess and clearly not the optimal use of branches.

for number 2 i used github like you suggested. you just have to be careful not to do stupid shit like A) commit your .(zsh|bash)_history file or B) commit your ssh keys or something. one is just a privacy thing, but the other is an actual security issue.

also i have a file called `.envariables` that just has all of my random keys (e.g. AWS, various API stuff, etc...) for calling from bash or from scripts or whatever. that's convenient, but obviously if you commit that shit you're gonna have a bad time.
>>
>>58947824
github
>>
>>58947824
you're mummy's bunghole
>>
Dotfile git repo with symlinks to all the config files in the system. A simple install script which adds these configs to the necessary directories in case of a fresh install.
>>
I use homesick to symlink the entire contents of a git repo into ~/
Thread posts: 16
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.