Skip to content

Instantly share code, notes, and snippets.

View somangshu's full-sized avatar
💭
Dreaming...Lucidly

Somangshu Goswami somangshu

💭
Dreaming...Lucidly
View GitHub Profile
/*! For license information please see main.11c77605.js.LICENSE.txt */
!function(){"use strict";var e={463:function(e,n,t){var r=t(791),l=t(296);function a(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,u={};function i(e,n){s(e,n),s(e+"Capture",n)}function s(e,n){for(u[e]=n,e=0;e<n.length;e++)o.add(n[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\u
@somangshu
somangshu / github_label_copier.sh
Last active August 25, 2022 12:44
Copy labels from one repo to another
# This script uses the GitHub Labels REST API
# https://developer.github.com/v3/issues/labels/
# Provide a personal access token that can
# access the source and target repositories.
# This is how you authorize with the GitHub API.
# https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
GH_TOKEN="you personal access token"
# If you use GitHub Enterprise, change this to "https://<your_domain>/api/v3&quot;
@somangshu
somangshu / country.json
Last active November 12, 2020 06:23
All Countries with ISO codes, Currency/Names and their native symbols
[
{
"code": "AD",
"currency": "EUR",
"currency_name": "Euro",
"label": "Andorra",
"phone": "376",
"symbol_native": "€"
},
{
@somangshu
somangshu / app.js
Last active July 4, 2020 05:20
Setting up meta tags in django base template for use in react[client side]
// fetch the key from the base html using the below script, this
// can be used anywhere in your javascript, but consider storing it
// in local cache for better usage
const clientMeta = document.querySelector('meta[name="client-key"]');
const clientKey = vapidMeta.content;
@somangshu
somangshu / Dockerfile
Created June 28, 2020 05:56
Django Docker Deployment on AWS ECS
FROM python:3.7-buster
# install nginx
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends
COPY nginx.default /etc/nginx/sites-available/default
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
# copy source and install dependencies
RUN mkdir -p /app
@somangshu
somangshu / animatedHeaderView.js
Created February 26, 2019 08:01
React native animated scrollview
import React, { Component } from 'react';
import {
Animated,
Platform,
StatusBar,
StyleSheet,
Text,
View,
RefreshControl,
} from 'react-native';
@somangshu
somangshu / .env
Created January 6, 2019 14:12
Environment variables in python flask
APP_ENV=local
DEBUG=True
@somangshu
somangshu / Magentoajax.php
Last active February 10, 2016 17:51
Ajax binding to controller for response in magento.
/**
* adding cologne bundle to cart
* @return json response
*/
public function addtocartAction() {
$productId = Mage::app()->getRequest()->getParam('productId');
$options = Mage::app()->getRequest()->getParam('options');
try {
$params = array(