One place for hosting & domains

      Code

      Add a Promo Code


      A promo code adds a positive credit to an account, allowing you to pay for services using that credit. You’re able to add a promo code when signing up for an account. If you already signed up but haven’t entered a promo code, you may be able to do so from the Cloud Manager. To add a promo code to an existing account, certain conditions must be met:

      • The account must be less than 90 days old.
      • There must not be a negative balance on the account.
      • No other promo codes can already be applied to the account.
      • The user that’s logged in must have unrestricted permissions.

      If those conditions are met, you can add a promo code by following these instructions:

      1. Navigate to the Billing Info page in the
        Cloud Manager (see
        Accessing Billing Information).

      2. Under the Account Balance section, click the Add a promo code link.

        Account balance section of the Billing Info page

      3. In the Add promo code dialog box that is displayed, enter the promo code and click the Apply Promo Code button. You should now see the promotional credit amount reflected in your account balance.

      This page was originally published on



      Source link

      Supercharging How You Build Apps With Little to No Code


      How to Join

      This Tech Talk is free and open to everyone. Register below to get a link to join the live stream or receive the video recording after it airs.

      Date Time RSVP
      February 16, 2021 11:00–12:00 p.m. ET / 4:00–5:00 p.m. GMT

      About the Talk

      Wish it were easier to tinker with code, collaborate, and scale?

      Explore how you can unlock more magic and creativity with Glitch and DigitalOcean.

      Join Anil (CEO, Glitch) and Gabe (CPO, DigitalOcean) in a conversation about simplifying your workflow while you get apps to market faster.

      What You’ll Learn

      • Experimenting without dealing with the headaches of coding
      • Going from idea to code, with the support of a community of builders
      • Simplifying your development workflow and cloud setup so that you can build fast, full-stack apps in the browser, and scale with confidence

      This Talk is Designed For

      Anyone who wants to build fast, full-stack web apps in the browser while keeping costs in check

      Resources

      Getting Started on Glitch
      Glitch is a friendly community that makes it super easy to build a full-stack app and launch it on a secure URL in under a minute. Under the hood, Glitch’s in-browser editor combines real-time code collaboration, instant deployment, and automatic git-based version control. On the surface it makes all of that as easy as pushing a button.

      The DigitalOcean Developer Cloud™ simplifies modern app creation for new generations of developers working independently, at tech startups, and within small-to-medium sized businesses around the world.

      About the Presenters

      Anil Dash is CEO of Glitch, the friendly developer community where coders have collaborated to create and share millions of web apps. He is recognized as a leading advocate for more humane, inclusive and ethical technology through his work as an entrepreneur, activist and writer.

      Gabe Monroy is Chief Product Officer at DigitalOcean where he oversees the product management organization and owns the company’s product vision. Previously, Gabe was vice president of the Azure Developer Experience group at Microsoft, and founder and chief technology officer (CTO) of Deis, which was acquired by Microsoft in 2017. After joining Microsoft, Gabe started Azure Kubernetes Service, the fastest-growing compute service in Azure’s history. As an early contributor to Docker and Kubernetes, and a founding member of the Cloud Native Computing Foundation (CNCF), Gabe has deep experience in open source software and cloud-native technology.

      Need help with large deployments, migration planning, or a proof of concept? Fill out this form and we’ll be in touch!



      Source link

      How To Install and Use the Visual Studio Code (VS Code) Command Line Interface


      Introduction

      Visual Studio Code is a free, open-source, and cross-platform text editor developed primarily by Microsoft. It uses web technologies such as JavaScript and CSS, which has helped facilitate a large ecosystem of community-created plugins to extend its functionality into many different programming languages and features.

      In this tutorial, you’ll install the Visual Studio Code command line interface and learn how to use it to open files and directories, compare changes between files, and install extensions.

      Prerequisites

      To complete this tutorial, you’ll need to have Visual Studio Code installed. Please refer to the official Setting up Visual Studio Code documentation to find out how to install Code for your platform.

      Installing the Visual Studio Code Command Line Interface

      You may need to install the Visual Studio Code command line interface before using it. To do so, first launch the normal Visual Studio Code graphical interface. If this is your first time opening the app, the default screen will have a icon bar along the left, and a default welcome tab:

      A screenshot of the default

      Visual Studio Code provides a built-in command to install its command line interface. Bring up Code’s Command Palette by typing Command+Shift+P on Mac, or Control+Shift+P on Windows and Linux:

      A screenshot of the Visual Studio Code interface with the Command Palette activated, waiting for input to be entered after its '>' prompt

      This will open a prompt near the top of your Code window. Type shell command into the prompt. It should autocomplete to the correct command which will read Shell Command: Install 'code' command in PATH:

      A screenshot of the Visual Studio Code interface, with the Command Palette activated and the "Install 'code' command in PATH" command highlighted

      Press ENTER to run the highlighted command. You may be prompted to enter your administrator credentials to finish the installation process.

      You now have the code command line command installed.

      Verify that the install was successful by running code with the --version flag:

      Output

      1.62.1 f4af3cbf5a99787542e2a30fe1fd37cd644cc31f x64

      If your output includes a version string, you’ve successfully installed the Visual Studio Code command line interface. The next few sections will show you a few ways to use it.

      Opening Files with the code Command

      Running the code command with one or more filenames will open those files in the Visual Studio Code GUI:

      This will open the file1 file in Code.

      This will open all markdown (.md) files in the current directory in Code.

      By default, the files will be opened in an existing Code window if one is available. Use the --new-window flag to force Visual Studio Code to open a new window for the specified files.

      Opening a Directory with the code Command

      Use the code command followed by one or more directory names to open the directories in a new Visual Studio Code window:

      • code directory1 directory2

      Code will open a new window for the directories. Use the --reuse-window flag to tell Code to reuse the existing frontmost window instead.

      Opening a .code-workspace Workspace File with the code Command

      Opening a workspace file with the code command works similar to opening directories:

      • code example.code-workspace

      This will open the example workspace in a new window, unless you reuse an existing window by adding the --reuse-window flag.

      Installing an Extension Using the code Command

      You can install Visual Studio Code extensions using the code command line tool as well. To do so, you’ll first need to know the extension’s unique identifier. To find this information, first navigate to the extension’s page on the Visual Studio Marketplace.

      For instance, here is the page for the Jupyter Notebook extension:

      https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

      Notice the itemName parameter in the address. This parameter’s value, ms-toolsai.jupyter, is this extension’s unique identifier.

      You can also find this information on the Marketplace page itself, towards the bottom of the right-hand column in the More info section:

      A screenshot of the Jupyter extension's page on the Visual Studio Marketplace, highlighting the 'Unique Identifier ms-toosai.jupyter' unique id information in the page's right-hand column

      Once you have this unique id, you can use it with code --install-extension to install the extension:

      • code --install-extension ms-toolsai.jupyter

      Output

      Installing extension 'ms-toolsai.jupyter'... Extension 'ms-toolsai.jupyter' v2021.11.1001489384 was successfully installed.

      Use the same id with the --uninstall-extension flag to uninstall the extension.

      Showing the Differences Between Two Files Using the code Command

      To show a standard split-screen diff that will highlight the additions, deletions, and changes between two files, use the --diff flag:

      A screenshot of the Visual Studio Code diff interface, with two files side by side, and the second line highlighted, showing a few words have changed between the two versions

      Similar to opening files, this will reuse the frontmost window by default, if one exists. To force a new window to open, use the --new-window flag.

      Piping stdin Into Visual Studio Code Using the code Command

      An important feature of most command line shells is the ability to pipe (or send) the output of one command to the input of the next. In the following command line, notice the | pipe character connecting the ls ~ command to code -:

      This will execute the ls command on the ~ directory, which is a shortcut for the current user’s home directory. The output from ls will be a list of files and directories in your home directory. This will be sent to the code command, where the single - indicates that it should read the piped in text instead of a file.

      code will output some information about the temporary file that it has created to hold the input:

      Output

      Reading from stdin via: /var/folders/dw/ncv0fr3x0xg7tg0c_cvfynvh0000gn/T/code-stdin-jfa

      Then this file will open up in the Code GUI interface:

      A screenshot of Visual Studio Code with a text file open, displaying the text piped in from the ls command. The text is standard directories such as Desktop and Documents, along with file1 and file2 used in the previous section

      This command will continue to wait indefinitely for more input. Press CTRL+C to have code stop listening and return you to your shell.

      Add the --new-window flag to force Code to open a new window for the input.

      Conclusion

      In this tutorial you installed Visual Studio Code’s code command line tool, and used it to open files and directories, compare files, and install extensions.

      To learn more about the code command, you can run its --help function:

      You can also refer to the official Visual Studio Code command line documentation or take a look at our VS Code tag page for more Visual Studio Code tutorials, tech talks, and Q&A.



      Source link