Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free

configuration posts

  • By Matthew Setter
    Working with Environment Variables in PHP Working with Environment Variables in PHP

    Environment variables are an excellent way to configure PHP applications because they keep the application’s settings outside of the code. By doing this, it's easier to prevent secure credentials from being exposed, maintain applications, and use applications across multiple environments.

    In this tutorial, you're going to learn about some of the many ways in which environment variables can be set and retrieved in PHP applications. That way, your application can access all the information that it needs, such as API keys, uploaded files, query strings, and form data.

    How to access environment variables in PHP

    Use PHP's Superglobals

    One of the most common ways that environment variables are accessed in PHP is through the use of Superglobals. These are built-in, predefined variables, available in all scopes. Initialised by the PHP runtime, they organise PHP's environment information in a (mostly) logical and efficient way, so that you only need to …

    Read More
  • By Matthew Setter
    Working with Environment Variables in Java Working with Environment Variables in Java

    Environment variables are a great way to configure Java applications without having to explicitly store settings in code, such as for database and caching servers, or for third-party APIs.

    Keeping such settings outside of the code has several distinct advantages:

    • Avoids the need to update and recompile code when settings change
    • Helps prevent exposing sensitive credentials, such as usernames and passwords, and deployment tokens
    • You can deploy the same code in multiple environments

    In this short article, I'm going to show you some of the ways of working with environment variables in Java.

    How to access environment variables in Java

    One of the most common ways is to use System.getenv(), which accepts an optional String argument. Based on whether a String argument is passed, a different value is returned from the method. Specifically:

    If a String is passed and it matches a key in the internal environment Map, …

    Read More
  • By Sam Agnew
    5 Awesome Vim Tricks to Spice up your .vimrc Copy of Generic Blog Header 4(5).png

    If there's one thing Vim users love more than saving a few seconds per day on keystrokes, it's trading tips and tricks with others about their own setup. As someone who's been using Vim for 7 years now as his primary text editor, I'm going to do my part by sharing some neat things from my .vimrc that people have asked me about at conferences and hackathons in the past.

    For each of these examples, I'll provide the code for you to copy/paste into your own .vimrc and try to explain what's going on. Take what you think works for you and leave the rest!

    Crosshair style cursor highlighting

    One thing that people ask me about often is the crosshair style cursor that I use in my configuration. All you need to do to make your cursor look like this:

    Cursor Crosshair

    ...is add these lines to your .vimrc file (typically located …

    Read More
  • By Layla Porter
    User Secrets in a .NET Core Console App ql_dT1NFRE2Ek6IJeN8z-gyeX9mgJSfsxu8pFUL_eYRv3v_eqDImX7RMraYSJF4JUHsVYBGJDC01EI1fv2IMf7O2yz2CJixA9OpUwIBQEELHjjBuEcOEQ462y4fSMOVlaxhW3Cxk-1

    Ever had that sinking moment of realisation when you push your secrets to GitHub? I have and I doubt I’m the only one.

    There are many reasons why you wouldn’t want your sensitive configurations shared and I’m not just talking about on GitHub. Members of a development team may not use the same test databases or connection strings. Maybe the dev team only has access to the test keys for apps such as Twitter but the live keys are squirrelled away in Azure.

    A common way to deal with sensitive data in an app is by using Environment Variables. With the arrival of .NET Core we now have a tidy way of managing configuration and sensitive data in the form of User Secrets, which can be managed by the Secrets Manager Tool (SMT) from the command line. User Secrets are stored outside of the project tree in a JSON …

    Read More
  • By Layla Porter
    User Secrets in a .NET Core Web App 7XMCQ6zhfvbbT4Hf-XxrjbKM8GjV9IZIax0zJmkvtaTSXVfi7gDusJepXufpfu4j0R2BDNNvMaOgzcV_CtQcwWYNUip440zCvQ5yJ0-8sFVkZApwLdjtyRA4YSaVpouZFq6M4-s8-2

    Ever had that sinking moment of realisation when you push your secrets to GitHub? I have and I doubt I’m the only one.

    There are many reasons why you wouldn’t want your sensitive configurations shared and I’m not just talking about on GitHub. Members of a development team may not use the same test databases or connection strings. Maybe the dev team only has access to the test keys for apps such as Twitter but the live keys are squirrelled away in Azure.

    A common way to deal with sensitive data in an app is by using Environment Variables. With the arrival of .NET Core we now have a tidy way of managing configuration and sensitive data in the form of User Secrets, which can be managed by the Secrets Manager Tool (SMT) from the command line. User Secrets are stored outside of the project tree in a JSON …

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.