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 / 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.
vehicle = {
printStuff: function() {
'use strict';
console.log('this of object method', this);
return function() {
console.log('this of nested regular function expression', this);
}
}
};
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 );
@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==
@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 / 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

DEBUG: File config
"config": {}
DEBUG: CLI config
"config": {
"repositories": ["swashata/ComposerTypeError"],
"logLevel": "debug",
"platform": "gitlab",
"endpoint": "https://wpquark.io/api/v4/",
"token": "***********"
}
@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",