You have installed GPG, then tried to commit and suddenly you see this error message after it:
error: gpg failed to sign the data
fatal: failed to write commit object
Debug
#!/bin/bash | |
aws ecr describe-repositories | jq '.repositories[].repositoryName' | xargs -I {} aws ecr put-lifecycle-policy --repository-name {} --lifecycle-policy-text "file://policy.json" |
#!/bin/sh | |
## Requires openssl, nodejs, jq | |
header=' | |
{ | |
"kid": "12345", | |
"alg": "RS256" | |
}' | |
payload=' | |
{ | |
"iss": "https://example.com", |
use git diff to generate file list
git diff --name-only master
add ext filter
One cool feature of React which isn't highlighted that often are "error boundaries".
Error boundaries can catch errors which are thrown inside your component during a lifecycle. You can use them in very fine-granular levels wrapping very small components (but I rarely see this) or you can wrap your whole app and show some fallback content, if an error happens. But you can also wrap something in between those extrem ranges and add a proper reset. Also it's not a hidden secret how to do that I haven't see a lot of people talking about that. So here is a small example which use react-router-dom
to do that. You can see the complete example here.
Let's imagine you have the following app:
import * as React from 'react';
import { render } from 'react-dom';
import { Link, BrowserRouter, Switch, Route, Redirect } from 'react-router-dom';
#!/bin/bash | |
MESSAGE="Message" | |
SLACK_CHANNEL="#slack-channel" | |
SLACK_TOKEN=xoxb-1234-000000000000 | |
curl -X POST \ | |
-H "Authorization: Bearer $SLACK_TOKEN" \ | |
-H "Content-type: application/json; charset=utf-8" \ | |
--data '{"channel":"'$SLACK_CHANNEL'","text":"'"$MESSAGE"'"}' \ |
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true
Crossing reviews becomes a very common activity today in engineering behavior. To help us review changes for pull/merge requests easier, sorting imports can help us a much. The codebase becomes more professional and more consistent, reviewers will be happier, and the review process will be faster, focusing on the implementation changes ONLY.
Have you ever thought about how to sort imports in TypeScript projects automatically?
Let me show you how to archive sorting imports automatically in TypeScript projects with ESLint!
FROM node:slim | |
# We don't need the standalone Chromium | |
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | |
# Install Google Chrome Stable and fonts | |
# Note: this installs the necessary libs to make the browser work with Puppeteer. | |
RUN apt-get update && apt-get install gnupg wget -y && \ | |
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ | |
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ |