Posted as a comment in this stackexchange question
https://unix.stackexchange.com/questions/419761/webp-animation-to-gif-animation-cli
Usage:
- Make sure python3 is installed.
- Install
Pillow
package
python3 -m pip install --upgrade Pillow
Posted as a comment in this stackexchange question
https://unix.stackexchange.com/questions/419761/webp-animation-to-gif-animation-cli
Usage:
Pillow
packagepython3 -m pip install --upgrade Pillow
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"os/signal" |
I really liked @tjvantoll article Handling Failed HTTP Responses With fetch(). The one thing I found annoying with it, though, is that response.statusText
always returns the generic error message associated with the error code. Most APIs, however, will generally return some kind of useful, more human friendly message in the body.
Here's a modification that will capture this message. The key is that rather than throwing an error, you just throw the response and then process it in the catch
block to extract the message in the body:
fetch("/api/foo")
.then( response => {
if (!response.ok) { throw response }
return response.json() //we only get here if there is no error
})
outdated, someone else is updating the list now -> https://gist.github.com/Fobxx/107e2bad2bf7312cd49431c696aac912
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
{ | |
// The command to execute for the terminal, leave blank for the OS default | |
// On OS X the terminal can be set to iTerm.sh to execute iTerm | |
"terminal": "C:\\Windows\\System32\\cmd.exe", | |
// A list of default parameters to pass to the terminal, this can be | |
// overridden by passing the "parameters" key with a list value to the args | |
// dict when calling the "open_terminal" or "open_terminal_project_folder" | |
// commands | |
"parameters": ["/c sh --login -i"] |