Skip to content

Instantly share code, notes, and snippets.

View proshoumma's full-sized avatar
🐢
I may be slow to respond.

Provash Shoumma proshoumma

🐢
I may be slow to respond.
View GitHub Profile
@mikebroberts
mikebroberts / template.yaml
Last active March 7, 2024 13:45
CloudFront Functions Demo with CloudFormation
Description: CloudFront Functions Demo
# This example shows how to use CloudFront, CloudFront Functions, and CloudFormation.
# In this simple example we setup CloudFront so that on any request we redirect to another site.
# While basic, this example can be expanded to provide typical redirect scenarios, based
# on the event passed to the function.
# This example written by Mike Roberts (https://twitter.com/mikebroberts), Symphonia.
# For more ideas about using AWS more effectively,see our blog at https://blog.symphonia.io/
@matthewsuan
matthewsuan / axios.js
Last active March 28, 2024 12:36
Axios request queue-like that limits number of requests at any given time
import axios from 'axios'
const MAX_REQUESTS_COUNT = 5
const INTERVAL_MS = 10
let PENDING_REQUESTS = 0
// create new axios instance
const api = axios.create({})
/**
@bashtoni
bashtoni / gist:995c0683bb18fd19eaefdc296a9401d8
Created July 4, 2018 10:48
Find ARN for ACM certificate for a given domain name
aws acm us-east-1 list-certificates --query CertificateSummaryList[].[CertificateArn,DomainName] \
--output text | grep example.com | cut -f1
@SergeyKorochansky
SergeyKorochansky / react-native-navigation.ts
Created August 16, 2016 15:49
react-native-navigation.d.ts
declare module 'react-native-navigation' {
export interface NavigatorStyle {
navBarTextColor?: string;
navBarBackgroundColor?: string;
navBarButtonColor?: string;
navBarHidden?: boolean;
navBarHideOnScroll?: boolean;
navBarTranslucent?: boolean;
navBarNoBorder?: boolean;
drawUnderNavBar?: boolean;
@Jpoliachik
Jpoliachik / index.ios.js
Last active August 17, 2021 10:27
ReactNative LayoutAnimation Example
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
LayoutAnimation,
} from 'react-native';
@learncodeacademy
learncodeacademy / webpack.config.js
Created January 8, 2016 03:55
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu
@dshaw
dshaw / gist:378192
Created April 25, 2010 05:56 — forked from paulirish/gist:315916
(function(window,document,undefined){ ... })(this,this.document);
// everyone's new favorite closure pattern:
(function(window,document,undefined){ ... })(this,this.document);
// when minified:
(function(w,d,u){ ... })(this,this.document);
// which means all uses of window/document/undefined inside the closure
// will be single-lettered, so big gains in minification.
// it also will speed up scope chain traversal a tiny tiny little bit.