Filling shapes with texture
Strategy

Filling shapes with texture


Filling shapes with texture

I'm currently working on a topographic map, mainly from qgis but I'm adding final touches in illustrator. My question is, am I able to fill my watershed shapes and make the look like the one on the right?

Original photo from: https://www.esri.com/en-us/arcgis/products/arcgis-pro/overview

https://preview.redd.it/z1x988x9fgp61.jpg?width=612&format=pjpg&auto=webp&s=87ebd58a184f6283707b313748f44966991bd7c8

submitted by /u/C_ROCHDI
[comments]



Source link

not optimal tests split on CI server, CI parallelism
Strategy

BDD Tests on Github Actions With Cucumber Run in Parallel Jo…


Cucumber employs Behavior-Driven Development (BDD) for testing your application. This type of test is often time-consuming when running in the browser. You will learn how to run Cucumber tests on Github Actions using parallel jobs to execute the test suite much faster.

Github Actions Matrix Strategy

You can use the Github Actions matrix strategy to run parallel jobs. You will need to divide your Cucumber test files between the parallel jobs in a way that work will be balanced out between the jobs.

It’s not that simple to do because often Cucumber tests can take a different amount of time. One test file can have many test cases, the other can have only a few but very complex ones, etc.

There are often more steps in your CI pipeline like installing dependencies, loading data from the cache and each step can take a different amount of time per parallel job before even Cucumber tests are started. The steps affect the overall CI build speed.

not optimal tests split on CI server, CI parallelism

What you would like to achieve is to run parallel jobs in a way that they always finish the execution of Cucumber tests at a similar time. Thanks to that you will avoid lagging jobs that could be a bottleneck in your CI build.

optimal tests split on CI server, CI parallelism

Dynamically Split Cucumber Tests Using Queue Mode

To get optimal CI build execution time you need to ensure the work between parallel jobs is split in such a way as to avoid bottleneck slow job. To achieve that you can split Cucumber test files in a dynamic way between the parallel jobs using Knapsack Pro Queue Mode and knapsack_pro ruby gem.

Knapsack Pro API will take care of coordinating how tests are divided between parallel jobs. On the API side, there is a Queue with a list of your test files and each parallel job on Github Actions is running Cucumber tests via the knapsack_pro Ruby gem. The knapsack_pro gem asks Queue API for a set of test files to run and after it gets executed then the gem asks for another set of test files until the Queue is consumed. This ensures that all parallel jobs finish running tests at a very similar time so that you can avoid bottleneck jobs.

tests split on CI server with Knapsack Pro Queue Mode, CI parallelism

You can learn more about the dynamic tests suite split in Queue Mode or check the video below.

Github Actions Parallel Jobs Config for Cucumber

Here is the full Github Actions YAML config example for the Cucumber test suite in a Ruby on Rails project using knapsack_pro gem to run Cucumber tests between parallel jobs.

# .github/workflows/main.yml
name: Main

on: [push]

jobs:
  test:
    runs-on: ubuntu-latest

    # If you need DB like PostgreSQL, Redis then define service below.
    # https://github.com/actions/example-services/tree/master/.github/workflows
    services:
      postgres:
        image: postgres:10.8
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: ""
          POSTGRES_DB: postgres
        ports:
          - 5432:5432
        # needed because the postgres container does not provide a healthcheck
        # tmpfs makes DB faster by using RAM
        options: >-
          --mount type=tmpfs,destination=/var/lib/postgresql/data
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

      redis:
        image: redis
        ports:
          - 6379:6379
        options: --entrypoint redis-server

    # https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
    strategy:
      fail-fast: false
      matrix:
        # Set N number of parallel jobs you want to run tests on.
        # Use higher number if you have slow tests to split them on more parallel jobs.
        # Remember to update ci_node_index below to 0..N-1
        ci_node_total: [8]
        # set N-1 indexes for parallel jobs
        # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
        ci_node_index: [0, 1, 2, 3, 4, 5, 6, 7]

    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.7

      - uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      - name: Bundle install
        env:
          RAILS_ENV: test
        run: |
          bundle config path vendor/bundle
          bundle install --jobs 4 --retry 3

      - name: Create DB
        env:
          # use localhost for the host here because we have specified a container for the job.
          # If we were running the job on the VM this would be postgres
          PGHOST: localhost
          PGUSER: postgres
          RAILS_ENV: test
        run: |
          bin/rails db:prepare

      - name: Run tests
        env:
          PGHOST: localhost
          PGUSER: postgres
          RAILS_ENV: test
          KNAPSACK_PRO_TEST_SUITE_TOKEN_CUCUMBER: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_CUCUMBER }}
          KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
          KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
          KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
          KNAPSACK_PRO_LOG_LEVEL: info
        run: |
          bundle exec rake knapsack_pro:queue:cucumber

Here is the view from Github Actions showing that we run 8 parallel jobs for the CI build.

Github Actions, parallel jobs, CI, testing

Summary

I hope you find this example useful. If you would like to learn more about Knapsack Pro, you can see a list of supported test runners for parallel testing in Ruby, JavaScript, etc.



Source link

r/web_design - 3 min design tip on how to use the font Faster One
Strategy

3 min design tip on how to use the font Faster One : web_des…


Hi everyone! Every week I research about a new font, write a 3 minute design and branding newsletter sharing design and branding tips around it called FontDiscovery. This week we looked at Faster One, a very graphic, funky display font. Thought I can share this here incase anyone finds it useful!

Inspiration for Faster One
Before personal computers, phototypesetting was a popular method that used the photographic process to generate text on a scroll of photo paper. This new method enabled people to get creative, which led to many decorative and “experimental” fonts.

Font details
Faster One is a display font, meaning it is better for flashy purposes. If we look at this font carefully, we’ll notice that the letterforms are very thick. Bold shapes communicate strength and energy. The decorative lines simulating velocity also adds a hint of humor and kitsch.

Should I use it for logo
I would reserve this font for any logo or branding, unless it’s for a very appropriate brand, like athletic apparel or streetwear. Faster One does have a fascinating character that can be fun for for statement making, like decals, streetwear, packaging, or anything with a more “graphic” purpose.

How should I use it for my copy and marketing
Faster One is not for displaying long quotes and large bodies of text. It is definitely not for a serious presentation. It just has too much personality.

More
See visual examples and use-cases of Faster One on fonts.substack.com
I share design and font tips every week to help founders and makers. subscribe if you feel like!

r/web_design - 3 min design tip on how to use the font Faster One



Source link

VS code live Sass compiler not generating css file
Strategy

VS code live Sass compiler not generating css file


VS code live Sass compiler not generating css file

As you can see in the pics, I have a path specified in settings.json but it's not generating a css file in the specified css folder when I click "Watch Sass".

https://preview.redd.it/6gzfy65g3ep61.jpg?width=956&format=pjpg&auto=webp&s=1af2e8bbcd6289994a2755ed08eb12a3f215da99

https://preview.redd.it/a9wnwb5g3ep61.png?width=941&format=png&auto=webp&s=ce6fc971865fa434dc54f40a524a07f55dfa99bb

submitted by /u/TheLonerCoder
[comments]



Source link

Building a Full-Stack Geo-Distributed Serverless App with Ma...
Strategy

Building a Full-Stack Geo-Distributed Serverless App with Ma…


In this article, we walk through building out a full-stack real-time and completely serverless application that allows you to create polls! All of the app’s static bits (HTML, CSS, JS, & Media) will be hosted and globally distributed via the GitHub Pages CDN (Content Delivery Network). All of the data and dynamic requests for data (i.e., the back end) will be globally distributed and stateful via the Macrometa GDN (Global Data Network).

Macrometa is a geo-distributed stateful serverless platform designed from the ground up to be lightning-fast no matter where the client is located, optimized for both reads and writes, and elastically scalable. We will use it as a database for data collection and maintaining state and stream to subscribe to database updates for real-time action.

We will be using Gatsby to manage our app and deploy it to Github Pages. Let’s do this!

Intro

This demo uses the Macrometa c8db-source-plugin to get some of the data as markdown and then transform it to HTML to display directly in the browser and the Macrometa JSC8 SKD to keep an open socket for real-time fun and manage working with Macrometa’s API.

Getting started

  1. Node.js and npm must be installed on your machine.
  2. After you have that done, install the Gatsby-CLI >> npm install -g gatsby-cli
  3. If you don’t have one already go ahead and signup for a free Macrometa developer account.
  4. Once you’re logged in to Macrometa create a document collection called markdownContent. Then create a single document with title and content fields in markdown format. This creates your data model the app will be using for its static content.

Here’s an example of what the markdownContent collection should look like:

{
  "title": "## Real-Time Polling Application",
  "content": "Full-Stack Geo-Distributed Serverless App Built with GatsbyJS and Macrometa!"
}

content and title keys in the document are in the markdown format. Once they go through gatsby-source-c8db, data in title is converted to <h2></h2>, and content to <p></p>.

  1. Now create a second document collection called polls. This is where the poll data will be stored.

In the polls collection each poll will be stored as a separate document. A sample document is mentioned below:

{
  "pollName": "What is your spirit animal?",
  "polls": [
    {
      "editing": false,
      "id": "975e41",
      "text": "dog",
      "votes": 2
    },
    {
      "editing": false,
      "id": "b8aa60",
      "text": "cat",
      "votes": 1
    },
    {
      "editing": false,
      "id": "b8aa42",
      "text": "unicorn",
      "votes": 10
    }
  ]
}

Setting up auth

Your Macrometa login details, along with the collection to be used and markdown transformations, has to be provided in the application’s gatsby-config.js like below:

 {
  resolve: "gatsby-source-c8db",
  options: {
    config: "https://gdn.paas.macrometa.io",
    auth: {
    email: "<my-email>",
     password: "process.env.MM_PW"
  },
    geoFabric: "_system",
    collection: 'markdownContent',
    map: {
      markdownContent: { 
        title: "text/markdown",
        content: "text/markdown" 
      }
    }
  }
}

Under password you will notice that it says process.env.MM_PW, instead of putting your password there, we are going to create some .env files and make sure that those files are listed in our .gitignore file, so we don’t accidentally push our Macrometa password back to Github. In your root directory create .env.development and .env.production files.

You will only have one thing in each of those files: MM_PW='<your-password-here>'

Running the app locally

We have the frontend code already done, so you can fork the repo, set up your Macrometa account as described above, add your password as described above, and then deploy. Go ahead and do that and then I’ll walk you through how the app is set up so you can check out the code.

In the terminal of your choice:

  1. Fork this repo and clone your fork onto your local machine
  2. Run npm install
  3. Once that’s done run npm run develop to start the local server. This will start local development server on http://localhost:<some_port> and the GraphQL server at http://localhost:<some_port>/___graphql

How to deploy app (UI) on GitHub Pages

Once you have the app running as expected in your local environment simply run npm run deploy!

Gatsby will automatically generate the static code for the site, create a branch called gh-pages, and deploy it to Github.

Now you can access your site at <your-github-username>.github.io/tutorial-jamstack-pollingapp

If your app isn‘t showing up there for some reason go check out your repo’s settings and make sure Github Pages is enabled and configured to run on your gh-pages branch.

Walking through the code

First, we made a file that loaded the Macrometa JSC8 Driver, made sure we opened up a socket to Macrometa, and then defined the various API calls we will be using in the app. Next, we made the config available to the whole app.

After that we wrote the functions that handle various front-end events. Here’s the code for handling a vote submission:

onVote = async (onSubmitVote, getPollData, establishLiveConnection) => {
  const { title } = this.state;
  const { selection } = this.state;
  this.setState({ loading: true }, () => {
  onSubmitVote(selection)
    .then(async () => {
      const pollData = await getPollData();
      this.setState({ loading: false, hasVoted: true, options: Object.values(pollData) }, () => {
        // open socket connections for live updates
        const onmessage = msg => {
          const { payload } = JSON.parse(msg);
          const decoded = JSON.parse(atob(payload));
          this.setState({ options: decodedBuilding a Full-Stack Geo-Distributed Serverless App with Macrometa, GatsbyJS, & GitHub Pages });
        }
        establishLiveConnection(onmessage);
      });
    })
    .catch(err => console.log(err))
  });
}

You can check out a live example of the app here

You can create your own poll. To allow multiple people to vote on the same topic just share the vote URL with them.



Source link

r/webdev - Font Metropolis-Regular acting weird
Strategy

Font Metropolis-Regular acting weird : webdev


Hi everyone,

I’m using the following font:

font-family: 'Metropolis-Regular', sans-serif
text-transform: uppercase
font-size: 12px

the problem is that it creates a visual bug at 12px and some other font-sizes where the capital letter “S” is smaller than the other capital letters.

r/webdev - Font Metropolis-Regular acting weird

Do you have any idea how to solve this? Any help would be really appreciated.

Thanks



Source link

r/graphic_design - The Game Changers of Graphic Design [Poster for Class]
Strategy

The Game Changers of Graphic Design [Poster for Class] : gra…


Hey, ya’ll! Today, in my Adv. Graphic Design class, we had to make an 8.5×11 page/poster summarizing and giving our opinions about three trends: metaphoric lettering, visual puns, and white space with a minimum of 300 words. I decided to not play it safe and use the ideas that came to mind with (I wanted to do a half infographic and neon movie poster concept) and write what I wanted and didn’t want in this assignment. What are ya’ll thoughts?

r/graphic_design - The Game Changers of Graphic Design [Poster for Class]



Source link

r/web_design - 3 min design tip on how to use the font Faster One
Strategy

3 min design tip on how to use the font Faster One : web_des…


Hi everyone! Every week I research about a new font, write a 3 minute design and branding tips about it and share it in my newsletter FontDiscovery. This week we looked at Faster One, a very graphic, funky display font. Thought I can share this here incase anyone finds it useful!

Inspiration for Faster One
Before personal computers, phototypesetting was a popular method that used the photographic process to generate text on a scroll of photo paper. This new method enabled people to get creative, which led to many decorative and “experimental” fonts.

Font details
Faster One is a display font, meaning it is better for flashy purposes. If we look at this font carefully, we’ll notice that the letterforms are very thick. Bold shapes communicate strength and energy. The decorative lines simulating velocity also adds a hint of humor and kitsch.

Should I use it for logo
I would reserve this font for any logo or branding, unless it’s for a very appropriate brand, like athletic apparel or streetwear. Faster One does have a fascinating character that can be fun for for statement making, like decals, streetwear, packaging, or anything with a more “graphic” purpose.

How should I use it for my copy and marketing
Faster One is not for displaying long quotes and large bodies of text. It is definitely not for a serious presentation. It just has too much personality.

More
See visual examples, use-cases and get download link of Faster One on fonts.substack.com I share design and font tips every week to help founders and makers. Subscribe if you feel like!

r/web_design - 3 min design tip on how to use the font Faster One



Source link