Skip to content

Instantly share code, notes, and snippets.

View akshayjai1's full-sized avatar

Akshay Vijay Jain akshayjai1

View GitHub Profile
@rodgtr1
rodgtr1 / awsCLIAutomation.sh
Created July 2, 2021 14:13
Script to authenticate with AWS CLI with MFA token
#!/bin/bash
set -e
# specify your MFA_DEVICE_ARN
MFA_DEVICE_ARN=YOURMFAARN
PATH_TO_CREDENTIALS_FILE=/path/to/.aws/credentials
echo $PATH_TO_CREDENTIALS_FILE
#1H = 3600
#2H = 7200
#3H = 10800
@kalpeshsingh
kalpeshsingh / pre-push
Last active April 26, 2024 04:31
A pre-push git hook that notify Amazon Chime group
#!/bin/sh
branch="$(git rev-parse --abbrev-ref HEAD)"
# get computer name to append in Chime message
username=$USER
# a branch name where you want to prevent git push. In this case, it's "master"
if [ "$branch" = "master" ]; then
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@DimitryDushkin
DimitryDushkin / configs.js
Created October 2, 2018 14:19
React Native 0.57 + Babel 7 + Typescript + Jest
// babel.config.js
module.exports = {
"presets": [
"module:metro-react-native-babel-preset",
],
"plugins": [
["module-resolver", {
"root": ["./src"],
"extensions": [".js", ".ts", ".tsx", ".ios.js", ".android.js"]
}],
@ondrej-janosik
ondrej-janosik / bitbucket-pipelines.yml
Last active May 4, 2021 15:20
Using NPM CI and Cypress with Bitbucket Pipelines
# Check out my blog post about this topic at https://medium.com/@ondrej.janosik42/setting-up-bitbucket-pipelines-with-proper-caching-of-npm-and-cypress-74d033888186
image: node:10.8.0
options:
max-time: 30
pipelines:
default:
- step:
name: Install, build and tests
caches:
- npm
@spemer
spemer / customize-scrollbar.css
Last active May 4, 2024 06:37
✨ Customize website's scrollbar like Mac OS. Not supports in Firefox and IE.
/* Customize website's scrollbar like Mac OS
Not supports in Firefox and IE */
/* total width */
body::-webkit-scrollbar {
background-color: #fff;
width: 16px;
}
/* background of the scrollbar except button or resizer */
@divyanshu013
divyanshu013 / code.ext
Last active May 21, 2020 02:18
My VSCode extensions
code --install-extension EditorConfig.EditorConfig
code --install-extension Perkovec.emoji
code --install-extension SintrumIT.theme-oceanic-next-italic
code --install-extension agauniyal.vscode-caniuse
code --install-extension alefragnani.project-manager
code --install-extension andys8.jest-snippets
code --install-extension arcticicestudio.nord-visual-studio-code
code --install-extension be5invis.vscode-custom-css
code --install-extension bierner.markdown-emoji
code --install-extension bungcip.better-toml
@divyanshu013
divyanshu013 / code.settings
Last active May 21, 2020 02:18
My VSCode settings
{
"vscode_custom_css.imports": [
"file:///Users/divyanshu/.vscode/style.css"
],
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"javascript.validate.enable": false,
"editor.fontLigatures": true,
"editor.minimap.enabled": false,
"editor.multiCursorModifier": "ctrlCmd",
"workbench.startupEditor": "newUntitledFile",
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 8, 2024 14:30 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@sorenlouv
sorenlouv / determine-changed-props.js
Last active April 18, 2024 16:21
Determine which props causes React components to re-render
import React, { Component } from 'react';
export default function withPropsChecker(WrappedComponent) {
return class PropsChecker extends Component {
componentWillReceiveProps(nextProps) {
Object.keys(nextProps)
.filter(key => {
return nextProps[key] !== this.props[key];
})
.map(key => {