vagrant box download cache and unzip - vagrant

So I am trying to download a box that is in a .zip format like so:
vagrant box add win7-ie10 http://aka.ms/ie10.win7.vagrant
After downloading, I get this error
bsdtar: Invalid central directory signature
bsdtar: Error exit delayed from previous errors."
My questions are
Does anyone know if that's because it's a zip? If so, is there a way I could automated the process of downloading it.
Does vagrant cache this download somewhere I could reuse? It's a 4.5GB file so I don't wanna download it again. I have looked into the ~/.vagrant.d/boxes/win7-ie10/0 directory, but it is empty.

vagrant box add will only add .box file. box files are already compressed so you should not need to zip on top of it. and if its anyway zip, make sure to unzip before you run the command
check your ~/.vagrant.d/tmp folder, you should have the large file you have downloaded

I had the same problem with bsdtar and this image during extraction of vagrant box add.
The solution was to download the .zip file with firefox to my desktop and extract it. The extraction was no problem so the file seems to be okay.
Then use the .box file instead of an URL. This command added the box successfully:
vagrant box add IE11\ -\ Win7.box --name win7-basebox

Related

Where is the location of homebrew installed youtube-dl configuration? [macOS]

I am new to youtube-dl and programming in general so this has been a lot for me to get even this far. So homebrew is installed on my Macbook and homebrew was used to install youtube-dl and ffmpeg. I read somewhere about a configuration file located at ~/.config/youtube-dl/config on
https://github.com/ytdl-org/youtube-dl/blob/master/README.md#options
So on the user directory I opened .config (found out it was hidden) and no youtube-dl folder found let alone the config file mentioned in the link.
Why is that?
How do I make a configuration file to use?
Like written on the Guthub page:
Note that by default configuration file may not exist so you may need to create it yourself.
You can simply create the directory ~/.config/youtube-dl yourself and then use your favorite text editor, place your options in a new file and save it at ~/.config/youtube-dl/config

Why the same zip file doesn't work in MacOS?

This is quite strange for me. I have an APP file (.app) which works on my MacOS. I want to upload it into the AWS S3 so I zip it as .app file is considered as a folder. When I download the zip file and unzip it, the app doesn't work anymore.
I even tried zipping it in terminal
zip -yr myapp.zip myapp.app
And when I download it, I also tried unzipping it in terminal
unzip myapp.zip -d myapp-folder
But that was also doesn't work. I checked the app size and they are identical. Any idea why it happens? and how can I fix it?
zip/unzip don't preserve file attributes (including extended attributes). To fix this, use ditto tool instead of zip/unzip.
The same rule for just copying files: use ditto instead of cp

Downloads folder from JupyterLab

I'd like to download a folder of pickle files from Jupyterlab (running on a google cloud instance) and I'm unable to find a way to do so. Apparently, downloading individual files is permitted but I have about 500 individuals pickle files in my folder to download and so would take while to do that manually.
As you can see in the menu below (when right click on the folder I want to download) I manage to install a "download folder as archive" extension but for some reasons the resulting zip format is unreadable locally.
I'm sure there must be a way of downloading folder easily from Jupyterlab and any help would be highly appreciated.
Thank you
I finally find a solution by zipping the folder using the following command:
zip -r example.zip original_folder
And it worked.
On you notebook try this
!zip -r example.zip original_folder
by adding ! you tell the notebook that you wanna execute external commands
You can also open a bash terminal, pack all desired files into an archive
tar -czf ARCHIVE_NAME.tar.gz FOLDER1 FOLDER2
and then download them. It might be necessary to move the archive into your virtual home folder in order to see it in the file browser on the left side though.

Install pandoc with no administrator access

I'm am using rmarkdown to generate a word output and need pandoc to do so. Unfortunately I do not have administrator access on my work computer so I can't run the installer or use the install.pandoc() option.
I have tried downloading both the .zip and .tar.gz files from the github site and tried to install them manually using the "install" tab in RStudio, but get the error:
Warning in install.packages :
cannot open compressed file 'pandoc-2.2.1-windows-x86/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
Here states "If you prefer not to use the msi installer, we also provide a zip file that contains pandoc’s binaries and documentation. Simply unzip this file and move the binaries to a directory of your choice."
maybe I don't know what they mean by "move the binaries to a directory of your choice." - When I unzip the files, I still cannot access the package.
Side note - I have defined .libpaths() to allow me to install other packages, but i cannot get pandoc to work.
Any suggestions on how to do this?
Pandoc is a terminal application and does not require R-Studio to install it unziping the .tar.gz file with
linux: tar -xzvf filename.tar.gz
for windows the binary is the program pandoc itself that is unzipped from the zip file
simply unzip the file and pandoc should already be installed in the unzipped folder
after unzipping you might want to move pandoc.exe (for windows) int the directory where the project is located so that it is recognized
So there are two steps in this process for me to get it to work.
1: Install Pandoc
First download the MSI from https://github.com/jgm/pandoc/releases/
If you have trouble installing the MSI by right clicking on it, try creating a batch file with the contents:
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
Then drag and drop the MSI on to this batch file and it will install without asking for any admin privileges.
2:
You'll need to tell the script to find Pandoc if its not running in RStudio already:
if(Sys.getenv("RSTUDIO") != "1"){rmarkdown::find_pandoc(dir = Sys.getenv("pandoc_path"))}
For me Sys.getenv("pandoc_path") = C:/Users/[username]/AppData/Local/Pandoc

Cannot find Mercurial global configuration file on osx

I am new to Bitbucket. I am trying to setup my computer to access Bitbucket using the following instructions. On Step 5, I am told to add ssh = ssh -C to file ~/.hgrc. I can't seem to find the file. Has anyone done this step successfully? How do I go about it?
It seems you don't have Mercurial installed at all. Step 3 of Bitbucket tutorial gives detailed description how to install it from MacPorts.
Once you have Mercurial installed just create .hgrc manually and add your configuration.
If you have not this file - create it. But you, maybe, just can't see it - dotted files are hidden. Anyway read hg help config
I had a problem with this too, but managed to find the .hgrc file. First get all hidden files visible by downloading this software http://invisiblix.read-write.fr/
Initially I tried to find the .hgrc file with spotlight but nothing came up. Happened to spotlight "~/", then this "~/.config" folder appeared, so I went there and found .hgrc in the same directory. Somehow it's always there but just not appearing even when called for in terminal.

Resources