Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
325883f
Windows url Handlers
fahad-israr Mar 5, 2020
71e357d
Created Custom Windows URL Handler Process
fahad-israr Mar 5, 2020
8770c7b
Rename Windows Url handler.adoc to Windows Url handler.md
fahad-israr Mar 5, 2020
f2c9f6b
Update Windows Url handler.md
fahad-israr Mar 5, 2020
d07c9a7
Windows Url handlers
fahad-israr Mar 5, 2020
7f82e9e
Create Testing Windows URL Handler.cs
fahad-israr Mar 5, 2020
1d5def1
Create README.md
fahad-israr Mar 5, 2020
7d05f99
Update Testing Windows URL Handler.cs
fahad-israr Mar 5, 2020
f9f9c40
Update README.md
fahad-israr Mar 5, 2020
f7016d8
Create Output.md
fahad-israr Mar 5, 2020
4e34894
Update README.md
fahad-israr Mar 5, 2020
9352095
Comprehensive Directory Names
fahad-israr Mar 5, 2020
6df7e3b
Linux Url handlers
fahad-israr Mar 5, 2020
899ec6e
Update README.md
fahad-israr Mar 5, 2020
a7604e7
Update README.md
fahad-israr Mar 5, 2020
11df2fe
Directory Nomenclature resolved
fahad-israr Mar 5, 2020
b06d223
Update README.md
fahad-israr Mar 5, 2020
49378e5
Vscode URL Handling support
fahad-israr Mar 7, 2020
fddae82
Support opening files through url Handling
fahad-israr Mar 7, 2020
76eea4b
Create ide-handler.desktop
fahad-israr Mar 10, 2020
117f2ec
Create ide-handler
fahad-israr Mar 10, 2020
7f23c3e
Create install
fahad-israr Mar 10, 2020
226db7b
Update README.md
fahad-israr Mar 10, 2020
20ab277
Update ide-handler.desktop
fahad-israr Mar 10, 2020
7567ec2
URL handler for Linux developed with Quarkus
fahad-israr Mar 24, 2020
9c24d33
Junit_5 tested
fahad-israr Mar 24, 2020
612515d
Added MacOS support and Junit_5
fahad-israr Mar 25, 2020
76224af
Added MacOS support and Junit_5
fahad-israr Mar 25, 2020
86748c9
Demo for Github Added
fahad-israr Mar 26, 2020
7bf2853
Update README.md
fahad-israr Mar 26, 2020
b879337
Update README.md
fahad-israr Mar 26, 2020
71dcd5d
Starfish Demo for Github
fahad-israr Mar 26, 2020
7c202db
Built Native Executable successfully
fahad-israr Mar 28, 2020
de047d0
Created a docker container for Native executable
fahad-israr Mar 28, 2020
90d664c
Extend Docker Container Instructions
fahad-israr Mar 28, 2020
2415b75
URL handler using Quarkus Developed
fahad-israr Mar 31, 2020
b3a883d
Update README.md
fahad-israr Mar 31, 2020
f4bdfbe
browser extension tested for chrome and firefox
fahad-israr Apr 8, 2020
332b9e6
Update README.md
fahad-israr Apr 8, 2020
aeb4f59
Update README.md
fahad-israr Apr 8, 2020
572368d
Supported browsers: chrome and firefox
fahad-israr Apr 8, 2020
c7d9a5a
Demo Added
fahad-israr Apr 8, 2020
1d1f105
Update README.md
fahad-israr Apr 8, 2020
76addca
Demo completed
fahad-israr Apr 8, 2020
f51eece
chrome extension developed from scratch to inject open_in_ide button …
fahad-israr Apr 11, 2020
98f2a35
Merge branch 'master' of https://github.com/fahad-israr/starfish
fahad-israr Apr 11, 2020
eb28383
chrome extension developed from scratch to inject open_in_ide button …
fahad-israr Apr 11, 2020
427a502
chrome extension developed from scratch to inject open_in_ide button …
fahad-israr Apr 11, 2020
fcae1ac
Update README.md
fahad-israr Apr 11, 2020
d3304f3
Support for Gitlab Added
fahad-israr Apr 12, 2020
bad29c5
Code structure improved
fahad-israr Apr 12, 2020
040e88f
support for gist.github.com added
fahad-israr Apr 12, 2020
8f934ab
Full Run Up Done Successully On Linux
fahad-israr Apr 17, 2020
618b515
Remove unnecessary_useless Files
fahad-israr Apr 17, 2020
6e5a204
Extension Improved
fahad-israr Apr 17, 2020
42093e4
interactive processing- starfish executing progress visible
fahad-israr Apr 19, 2020
b060a9e
Configuration File added for destination directory and ide
fahad-israr Apr 21, 2020
3e62636
scanning installed packages
fahad-israr Apr 22, 2020
8ce08d2
Introduced YML File for configuration instead of .properties file
fahad-israr Apr 28, 2020
ba460c4
Native executable binary updated
fahad-israr Apr 28, 2020
1840033
@User configurable and @Config sync with YML config file
fahad-israr Apr 30, 2020
fcb6ba6
Generated URL schemed to ide://https://github.com/user/repo
fahad-israr May 8, 2020
edb85c2
Linux Installed Updated
fahad-israr May 8, 2020
7843fdd
Merge https://github.com/maxandersen/starfish
fahad-israr May 8, 2020
3bf7e1c
Work Flow improved
fahad-israr May 8, 2020
9244b0b
Added Command line config suuport
fahad-israr May 8, 2020
38f535f
Update ide-handler
fahad-israr Jun 10, 2020
63d54fb
Windows Installer Added
fahad-israr Jun 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified README.adoc
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions adding_url_handlers_to_operating_system/linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# creating custom url handlers on linux:

- Clone the files you see above (`ide-handler, ide-handler.desktop, install`)
- run `sudo bash install` in console
- That's it!!
13 changes: 13 additions & 0 deletions adding_url_handlers_to_operating_system/linux/ide-handler
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Delete first 22 characters (ide://open?url=file://)
request=${1:22}

# Decode URL
request=$(echo $request | echo -e "$(sed 's/+/ /g; s/%/\\x/g')")

# Replace &line= with :
request=${request/&line=/:}

# Launch Starfish
/usr/bin/starfish -g -r $request
11 changes: 11 additions & 0 deletions adding_url_handlers_to_operating_system/linux/ide-handler.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=IDE URL Handler
Comment=Handle URL Scheme ide://
Icon=starfish
NoDisplay=true
Exec=starfish %u
MimeType=x-scheme-handler/ide
7 changes: 7 additions & 0 deletions adding_url_handlers_to_operating_system/linux/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

sudo cp ide-handler.desktop /usr/share/applications
sudo update-desktop-database

sudo cp ide-handler /usr/local/bin/
sudo chmod +x /usr/local/bin/ide-handler
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
cd "C:\Users\Public\Starfish"
starfish.exe %1
Binary file not shown.
6 changes: 6 additions & 0 deletions adding_url_handlers_to_operating_system/windows/install.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
cd %~dp0
xcopy /s/i "%~dp0\Starfish" "C:\Users\Public\Starfish"
echo Please accept the upcoming Prompts to install successfully
"%~dp0\starfish.reg"
PAUSE
Binary file not shown.
4 changes: 4 additions & 0 deletions basics_from _quarkus/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
35 changes: 35 additions & 0 deletions basics_from _quarkus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Eclipse
.project
.classpath
.settings/
bin/

# IntelliJ
.idea
*.ipr
*.iml
*.iws

# NetBeans
nb-configuration.xml

# Visual Studio Code
.vscode

# OSX
.DS_Store

# Vim
*.swp
*.swo

# patch
*.orig
*.rej

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
117 changes: 117 additions & 0 deletions basics_from _quarkus/.mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright 2007-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;

public class MavenWrapperDownloader {

private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";

/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";

/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";

/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";

public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());

// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);

File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}

private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}

}
Binary file not shown.
2 changes: 2 additions & 0 deletions basics_from _quarkus/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
53 changes: 53 additions & 0 deletions basics_from _quarkus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Starfish

This project uses Quarkus, the Supersonic Subatomic Java Framework.

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .

## Running the application in dev mode

You can run your application in dev mode that enables live coding using:
```
./mvnw quarkus:dev
```

## Packaging and running the application

The application can be packaged using `./mvnw package`.
It produces the `getting-started-1.0-SNAPSHOT-runner.jar` file in the `/target` directory.
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/lib` directory.

The application is now runnable using `java -jar target/getting-started-1.0-SNAPSHOT-runner.jar`.

## Creating a native executable

You can create a native executable using: `./mvnw package -Pnative`.

Or, if you don't have GraalVM installed, you can run the native executable build in a container using: `./mvnw package -Pnative -Dquarkus.native.container-build=true`.

You can then execute your native executable with: `./target/getting-started-1.0-SNAPSHOT-runner`


## Creating a container

By default, the native executable is tailored for your operating system (Linux, macOS, Windows etc). Because the container may not use the same executable format as the one produced by your operating system,
- we will instruct the Maven build to produce an executable from inside a container:

`./mvnw package -Pnative -Dquarkus.native.container-build=true`

- You can also select the container runtime to use with:

```
# Docker
./mvnw package -Pnative -Dquarkus.native.container-runtime=docker
# Podman
./mvnw package -Pnative -Dquarkus.native.container-runtime=podman
```

These are normal Quarkus config properties, so if you always want to build in a container it is recommended you add these to your `application.properties` so you do not need to specify them every time.

- you can build the docker image with:
`docker build -f src/main/docker/Dockerfile.native -t quarkus-quickstart/getting-started`

- And finally, run it with:
`docker run -i --rm -p 8080:8080 quarkus-quickstart/getting-started`
Loading