See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| /*------------------------ | |
| Libraries | |
| ------------------------*/ | |
| const axios = require("axios"); | |
| const fs = require("fs"); | |
| const FormData = require("form-data"); | |
| /*------------------------ | |
| Download the file. | |
| Good article on how to download a file and send with form data - https://maximorlov.com/send-a-file-with-axios-in-nodejs/ |
| import React, { useState, useEffect } from "react"; | |
| const Planets = () => { | |
| const [hasError, setErrors] = useState(false); | |
| const [planets, setPlanets] = useState({}); | |
| useEffect(() => { | |
| async function fetchData() { | |
| const res = await fetch("https://swapi.co/api/planets/4/"); | |
| res |
| // Modified version of this Stack Overflow response: | |
| // https://stackoverflow.com/a/48459005/1950503 | |
| // (Removes ramda dependency, adds .trim() to string replacer, adds it to Jest global var instead of exporting) | |
| // To use: | |
| // Put `<rootDir>/path/to/customWhitespaceMatcher.js` in your Jest config under setupFiles | |
| // Call it in your tests like this: | |
| // expect( | |
| // customMatchers.whitespaceMatcher(receivedResult, expectedResult).pass | |
| // ).toBeTruthy(); |
| require 'slack-ruby-client' # first, make sure you do: gem install slack-ruby-client | |
| require 'date' | |
| # Add your Slack API token here | |
| token = [YOUR TOKEN HERE] | |
| Slack.configure do |config| | |
| config.token = token | |
| end |
| # /etc/nginx/mime.types | |
| types { | |
| font/ttf ttf; | |
| font/opentype otf; | |
| text/html html htm shtml; | |
| text/css css; | |
| text/xml xml; | |
| image/gif gif; | |
| image/jpeg jpeg jpg; | |
| application/javascript js; |
| > Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk | |
| > but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these | |
| > steps thoroughly. | |
| Reset Steps: | |
| 1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds. | |
| 2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass. | |
| 3. Release both buttons. | |
| 4. Press the down buttons until the desk beeps one more time or 20 seconds pass. |
I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install.
The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands.
I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial.
I’ve made this according to the installation instructions given on GetGrav.
Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.
If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3
HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.
Follow along...
Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)
api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});
GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3