Skip to content

Instantly share code, notes, and snippets.

View Durairaj's full-sized avatar
🎯
Focusing

Durairaj Subramaniam Durairaj

🎯
Focusing
View GitHub Profile
@Durairaj
Durairaj / really-interesting-repos
Created February 26, 2022 00:01 — forked from jamiedevsandbox/really-interesting-repos
Curated list of impressive repositories
https://github.com/github/training-kit
https://github.com/AdguardTeam/AdGuardHome
https://github.com/TH3xACE/SUDO_KILLER
https://github.com/simbody/simbody
https://github.com/nongiach/sudo_inject
@Durairaj
Durairaj / db.js
Created January 12, 2022 15:31 — forked from cpsubrian/db.js
Mock knex database for Jest
/* eslint-env jest */
import _ from 'lodash'
import path from 'path'
import fs from 'fs'
import callsites from 'callsites'
import knex from 'knex'
import hash from 'object-hash'
import conf from '<conf>'
// Get the db config.
@Durairaj
Durairaj / jwtRS256.sh
Created September 17, 2021 09:55 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@Durairaj
Durairaj / LambdaConstants.java
Created January 29, 2021 00:10 — forked from seeebiii/LambdaConstants.java
Available default environment variables in AWS Lambda. Just copy&paste into your Node or Java project.
public class Constants {
/**
* Contains the path to your Lambda function code.
*/
public static final String LAMBDA_TASK_ROOT = System.getenv("LAMBDA_TASK_ROOT");
/**
* The environment variable is set to one of the following options, depending on the runtime of the Lambda function:
* AWS_Lambda_nodejs, AWS_Lambda_nodejs4.3, AWS_Lambda_nodejs6.10
@Durairaj
Durairaj / TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Created October 16, 2019 10:48 — forked from rimatla/TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Create React App + TypeScript Linting with TSLint and Prettier setup on VSCode

Ps: The current setup was done on 01-04-19

Project Dependency Versions at the time 👇

  "react": "^16.7.0",
  "react-dom": "^16.7.0",
  "react-scripts": "2.1.3",
  "typescript": "^3.2.2"
  "tslint": "^5.12.0",
  "tslint-config-prettier": "^1.17.0",
@Durairaj
Durairaj / gist:32d76ba2b3d11ce741c705d88219f572
Created April 24, 2019 15:22 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@Durairaj
Durairaj / webpack.config.js
Created November 12, 2018 23:58
Resolve modules which have been added using `npm link` or `yarn link`
const fs = require('fs')
const path = require('path')
// absolute paths to all symlinked modules inside `nodeModulesPath`
// adapted from https://github.com/webpack/webpack/issues/811#issuecomment-405199263
module.exports = function findLinkedModules(nodeModulesPath) {
const modules = []
fs.readdirSync(nodeModulesPath).forEach(dirname => {
const modulePath = path.resolve(nodeModulesPath, dirname)
@Durairaj
Durairaj / fix-homebrew-npm.md
Created December 22, 2015 22:36 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g