Skip to content

Instantly share code, notes, and snippets.

View swashata's full-sized avatar
🏡
Working from home

Swashata Ghosh swashata

🏡
Working from home
View GitHub Profile
@swashata
swashata / fontawesome-icons-with-categories.json
Created March 21, 2018 13:37 — forked from migliori/fontawesome-icons-with-categories.json
Font Awesome Version 5.0.6 JSON List with categories for use with https://codeb.it/fonticonpicker/
{
"Accessibility": [
"fab fa-accessible-icon",
"fas fa-american-sign-language-interpreting",
"fas fa-assistive-listening-systems",
"fas fa-audio-description",
"fas fa-blind",
"fas fa-braille",
"fas fa-closed-captioning",
"far fa-closed-captioning",
@swashata
swashata / bd3d4befe38185704bf0fc875e9deed6|configuration.json
Last active May 16, 2020 12:58
Visual Studio Code Settings Sync Gist
{"contents":{"launch":{"version":"0.2.0","configurations":[{"type":"node","request":"launch","name":"Launch Program","program":"${workspaceFolder}/importPhotosForEachVendor.js"}]}},"overrides":[],"keys":["launch.version","launch.configurations"]}
DEBUG: File config
"config": {}
DEBUG: CLI config
"config": {
"repositories": ["swashata/ComposerTypeError"],
"logLevel": "debug",
"platform": "gitlab",
"endpoint": "https://wpquark.io/api/v4/",
"token": "***********"
}
@swashata
swashata / Mac Apps.md
Last active September 25, 2018 14:31
Things I use on my Mac

So here I track support of apps and tools I use on my mac and make sure Mojave is compatible before I upgrade.

  • ✅ : Confirmed Works.
  • ❌ : Doesn't work (yet).
  • 😕 or nothing : Need research (helps welcome).
  • 🐛 : Has bugs.

Development

@swashata
swashata / array.reduce.js
Created November 30, 2018 13:23
Array Reduce
const arr = [1, 2, 3, 4, 5];
// Without initial value
const sumOfArr = arr.reduce((acc, cur) => {
return acc + cur;
});
console.log(sumOfArr);
// With initial value
const sumWithInitialValue = arr.reduce((acc, cur) => {
@swashata
swashata / wesbos-theater.js
Created February 4, 2019 10:03
Tampermonkey For theater mode wesbos
// ==UserScript==
// @name WesBos Theater Mode
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://courses.wesbos.com/account/access/*
// @grant none
// ==/UserScript==
const scoo = 'doo';
console.log(module.exports === exports);
// Assign variable scoo to exports
exports.scoo = scoo;
// Assign variable scoo to module.exports
module.exports = scoo;
console.log(module.exports === exports );
vehicle = {
printStuff: function() {
'use strict';
console.log('this of object method', this);
return function() {
console.log('this of nested regular function expression', this);
}
}
};
@swashata
swashata / Base.php
Last active May 31, 2019 07:31
Sample implementation of GraphQL integration test
<?php
/**
* Copyright (C) 2018 Swashata Ghosh <swashata@wpquark.com>
*
* This file is part of eForm - WordPress Builder.
*
* eForm - WordPress Builder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@swashata
swashata / index.html
Created September 13, 2019 05:30
Promises - The Easy Way
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<button id="fetch">Start the fetch</button>