how do i download from github instead of just copy pasting? - github

I go to a file with for example a .txt extension and there is no button to download, i have no option but to highlight and paste. This is ridiculous, how do i download such files from github? This system is so damn stupid.

Click the Raw Link for the file, then (depending on your browser configuration) it will either prompt you to download the file, or it will just show the raw file in the browser and you can save it with File -> Save As or whatever the equivalent is in your browser.

GitHub Mate is the right tool to do, it's a Chrome extension currently. I felt painful as you, so I created this extension.
It's open source here https://github.com/camsong/chrome-github-mate.

Related

Is it possible to paste files copied to the clipboard from other applications in VS Code?

Within the explorer panel of VS Code itself, if I want to copy a file to another directory in the workspace, I can use ctrl+c and ctrl+v, but if I find a file from another application on my computer such as the native File Explorer application, first pressing the shortcut key ctrl+c and then going to the VS Code window and pressing the shortcut key ctrl+v in the Explorer panel, there is no effect.
Note that I'm not talking about copying the contents of the file and pasting into VS Code. I'm talking about copying "the file" as in the notion of the file to the desktop environment.
The workaround is the use the native file explorer, copy the file first, then open the folder opened in VS Code, and finally paste it within the native file explorer. But I find this so troublesome.
Is there an easier way to do this? Does VS Code support such functionality to paste files copied to the clipboard from a different application (not VS Code) and paste into VS Code? Is that functionality hidden behind a setting that I need to change? Or is this possible via an extension?
Vscode does dragging the filename from a native file explorer (at least on Windows) and dropping in vscode's Explorer where you want it.
You can also use your OS's Open With... functionality and then drag the tab of that editor into whichever directory you want.
You can choose Add File from File to add a file to your workspace. Or you can use New File from File to create a new file in your workspace and copy the content of the file outside to it.
At the time of this writing, this is not supported... yet!
Work to implement this is tracked under this GitHub issue: Explorer: allow to paste files from the clipboard into target folder #130036, which is a subtask of a larger issue tracking a larger effort for Better drag and drop / clipboard integration of files across applications #164.
You can give a thumbs up reaction on those issue pages to increase their prioritization (but please don't leave "me too" comments there, as such comments are considered annoying noise).
pingren (a contributor to the VS Code repository) tried to implement this and found it to be more complicated than it looks. You can read their explanation of why in their comment there. One of the difficulties stems from itegration with system keybindings and VS Code's affordance for remapping keys:
the onPaste event could only be triggered by system paste (cmd+V on macOS). Users could change filesExplorer.paste command to any keybindings. So we need to consider how to merge native paste from clipboard and VSCode explorer paste.
There's another feature-request issue (Copy paste files from native explorer to vscode #89862, created before #130036) where isidorn (another VS Code contributor) commented:
This is a fair feature request however I believe there is a Chrome limtation which is preventing us from achieving this. [...]
As for extensions that might do this, I don't know of any (but haven't tried searching intently).
Other possible workarounds:
Try dragging the file from your native file explorer application to the VS Code file explorer panel. This is confirmed to work at least on Windows and Ubuntu.
From Mark's answer (copied under CC-BY-SA):
You can also use your OS's Open With... functionality and then drag the tab of that editor into whichever directory you want.
From user103's answer (copied under CC-BY-SA), and partially mentioned in the question post already:
You can choose Add File from File to add a file to your workspace. Or you can use New File from File to create a new file in your workspace and copy the content of the file outside to it.

Visual Studio Code, how to make local file link open default program

VS Code text editor highlights and allows to follow links, this includes local file URLs:
Ctrl+click opens the file in a new editor tab:
Is it possible to configure VS Code is some way to open the file in default program instead upon ctrl+click / follow link? (e.g. html file in web browser, mp3 in media player etc.)
Any setting, extension or different text markdown will do.
I don't think there is a default way in vscode to set open a file with default program.
However, there are extensions to deal with it. For example: Open in Application

How to convert a SB3 file to an EXE

I'm creating a game on Scratch 3, however, when I'm finished with it, I want to convert it to an .exe file. How do I do this?
I've been interested in game development for a long time, and have even tried Unity before, but I'm just a beginner meaning it was too difficult for me. So I turned to Scratch.
Yes, It is possible! ...But it's kinda complex,
Bear with me!
First, Take your sb3 file and convert it into a sb2. To do this I recommend using rexscratch's sb3tosb2 tool. Found here: https://github.com/RexScratch/sb3tosb2
Make sure you have python installed, if you don't, google how to install it. (it's easy).
Next, Click Clone or Download then click Download ZIP. Once that is downloaded, Open the zip, go to the next folder, and execute sb3tosb2.py . This will then ask for a sb3 file, Navigate to the sb3 file you have and select it. It may say it wants to work in compatibility mode, if it does, Just accept it. It will finish up and ask you where to put a sb2 file, just place it on your desktop and name it something.
Secondly, We need to use a program called junebeetle, Don't worry, it's a web based one, found here: https://junebeetle.github.io/converter/online/
Click open scratch file. It will ask for a sb2, Navigate to where you put the sb2 file and open it. If you want you can customize how it will open, you can. I like to use the auto start function, and fullscreen. Don't mess with the resolution unless you know not how to screw-up aspect-ratios. Then click "Convert to SWF" This will then download the SWF version the scratch game, simply name it what you want and leave it.
Finally, you need to convert the SWF file to an EXE, There are plenty of ways to do this, but for ease, I recommend using a lite file converter. SWF Tools is a good one found here: https://sourceforge.net/projects/swftools/files/SwF_To_eXe/Swf2eXe_Latest.zip/download
Let it download and then extract the zip file's content to your desktop or downloads folder. Then open the exe file inside the folder from the zip file you just extracted.
Almost there! Click "Add a file" Then, you guessed it, Navigate to the SWF file that was spat out from the conversion of the sb2. Then click "Convert" Let it do its thing, and soon it will finish. Boom, Done. To find your exe file, go to where you stored the SWF to EXE converter, go to the "Output" Folder, and infront of you, is your EXE File! Note: Your anti-virus might freakout, this is normal when making new programs.
Also, Some fonts may break, This is just a side effect of the sb3 to sb2 conversion due to the fact that there is currently no way to convert sb3 to SWF.
Hopefully that was easy enough to understand. It is a complicated process, But yields results!
If you have any issues, Just Ask! I can help!
You could use the TurboWarp Packager. It's free and safe. https://packager.turbowarp.org/
There might not be a specific or direct way to convert a Sb3 File to an exe file but You can do it indirectly in a few steps which might be kind of lengthy but works.
When your SB3 project is done, go to https://sheeptester.github.io/htmlifier/
And convert your sb3 file to html.
From there you can convert the html file you got just now to an exe file, but not as you might expect it to. You cannot convert an html page to an exe file so what you can do is add the html webpage (the scratch game now converted to a html webpage) as an 'embed' file in the software such as, like Unity or Visual Basic, as they allow html webpages to be embedded in a project. Then you can add features and stuff, then publish or export your project as an exe file.
I know the process is really lengthy and I practically just wrote a long boring thesis but this might be the only way you can convert scratch to exe.
Hope my answer helps!
Hasta La Vista
Convert your Scratch project to HTML using Scratch HTMLifier: https://sheeptester.github.io/words-go-here/htmlifier/
Download NW.js and put its files (nw.exe, ...) in a directory. Create a package.json file in that directory that should look like this:
{
"name": "Project",
"main": "project.html"
}
(replace Project with the name of your project and project.html with the name of your HTML file).
Make sure that your project runs when you start nw.exe.
Use any tool to turn your folder into a self-extracting archive.
See also: https://scratch.mit.edu/discuss/topic/341617/
use https://packager.turbowarp.org/
Using simple setting you can export without any problems.
This post is marked obsolete because the content is out of date. It is not currently accepting new interactions.
Currently, there is no software or smart javascript tricks that can convert .sb3 files into .exe files. You could use an .sb2 file but you need to use Scratch 2.0. There are developers working on conversion programs that do .sb3 to .exe but that will take a while. I would recommend using Scratch 2.0 if you want to convert your Scratch games to an executable.

How do I copy all css from a website using Chrome's inspect element.

I'm coding a website and using a Chrome window to view my work. I've tried to copy my changed CSS, so I can save it in my Sublime file, and there doesn't seem to be a way. Any suggestions?
You can actually edit your source files in Chrome.
I.e, you don't need to transfer your changes from Chrome to your editor.
Read this article by Arthur Evans and Tim Statler to learn about workspaces:
http://www.html5rocks.com/en/tutorials/developertools/revolutions2013/

Opening many files in Eclipse with a script for formatting

So i want to format a bunch of files that i have to a certain standard. The problem is, there is A LOT of files. Is there anyway to have Eclipse open a file, hit CTRL+SHIFT+F (to format the file), save it, close it, then open the next file and repeat that process through a directory that i specify?
I don't have any experience with scripting so i have not even attempted doing something like this. I looked into plugins for Eclipse that could maybe do this but i really didn't get anywhere.
Any help is appreciated.
Thanks
You can right-click on any source folder in the Package Explorer (including the root of the project) and select Source > Format, or Source > Cleanup (which gives you even more control than a simple format)
You can right click on a folder in the Navigator or Package Explorer view and select Source -> Format. This will format all the files in the selected directory.