Skip to content

Instantly share code, notes, and snippets.

View akash-gajjar's full-sized avatar
🎯
Focusing

Aakash Gajjar akash-gajjar

🎯
Focusing
View GitHub Profile
@seeliang
seeliang / lint-only-changed-files.MD
Last active December 2, 2024 05:08
How to lint only changed files?

find out the differences

use git diff to generate file list

git diff --name-only master

limited to certain file types

add ext filter

@shu-yusa
shu-yusa / create_jwt.sh
Last active May 10, 2025 22:21
Generate private and public keys, and create JWT and JWKs
#!/bin/sh
## Requires openssl, nodejs, jq
header='
{
"kid": "12345",
"alg": "RS256"
}'
payload='
{
"iss": "https://example.com",
@shcallaway
shcallaway / apply-ecr-lifecycle-policy.sh
Last active May 30, 2023 07:00
Apply the same lifecycle policy to all AWS ECR repositories
#!/bin/bash
aws ecr describe-repositories | jq '.repositories[].repositoryName' | xargs -I {} aws ecr put-lifecycle-policy --repository-name {} --lifecycle-policy-text "file://policy.json"
@paolocarrasco
paolocarrasco / README.md
Last active May 16, 2025 17:28
How to understand the `gpg failed to sign the data` problem in git

Problem

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

@sokuhatiku
sokuhatiku / config.yaml
Last active January 25, 2023 10:45
Verdaccio for Unitypackage
#
# This is the default config file. It allows all users to do anything,
# so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: ./storage

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at [email protected] or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

Render 1 Render 2 State Preserved?
<>...</> <>{[...]}</> yes (in any level)
<><>...</></> <>...</> no
[...] [[...]] no
[<>...</>]* [...] no
[<>...</>]* <>...</> no
[<>...</>]* <>[...]</> no
[<>...</>]* [[...]] yes
[&lt;&gt;...&gt;]* &lt;&gt;&lt;&gt;...&gt;&gt; yes
@gcalcettebr
gcalcettebr / mongo-backup.sh
Last active January 13, 2023 06:16
MongoDB Backup on S3
#!/bin/bash
# mongo-backup.sh
# Script to automate MongoDB Backups
#
# Requirements:
# mongodump
# s3cmd
#
# Author:
@siygle
siygle / Dockerfile
Last active January 25, 2023 10:45
Setup verdaccio on dokku
FROM node:8.6.0-alpine
LABEL maintainer="https://github.com/verdaccio/verdaccio"
RUN apk --no-cache add openssl && \
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
chmod +x /usr/local/bin/dumb-init
# If you want "dokku enter" don't forget install bash
# https://github.com/dokku/dokku/issues/2572
RUN apk update && \
@sam-artuso
sam-artuso / setting-up-babel-nodemon.md
Last active March 30, 2025 10:24
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y