Skip to content

Instantly share code, notes, and snippets.

View mittalyashu's full-sized avatar

Yashu Mittal mittalyashu

View GitHub Profile
# Source: https://gist.github.com/0c56f8b8a820198ada44123fa1bf4b60
################################################################
# How To Apply GitOps For Everything Using Crossplane And Flux #
# https://youtu.be/dunU2ABitMA #
################################################################
# Additional Info:
# - eksctl - How to Create and Manage AWS EKS clusters: https://youtu.be/pNECqaxyewQ
# - Flux CD v2 With GitOps Toolkit - Kubernetes Deployment And Sync Mechanism: https://youtu.be/R6OeIgb7lUI
@mittalyashu
mittalyashu / index.js
Created October 20, 2020 03:37
Centinni plans and subscriptions APIs and db models
const { buildASTSchema } = require("graphql");
const { mergeTypeDefs } = require("@graphql-tools/merge");
// schema
const mutationOutput = require("./mutationOutput");
const book = require("./types/book");
const chapter = require("./types/chapter");
const genre = require("./types/genre");
const blog = require("./types/blog");
@mittalyashu
mittalyashu / idGenerator.js
Created August 6, 2020 08:41
Random ID generator
exports.idGenerator = () => {
return (
Math.random()
.toString(32)
.substr(2) +
Math.random()
.toString(32)
.substr(2)
);
};
@mittalyashu
mittalyashu / pdf_to_image.py
Last active October 19, 2019 02:08
Python script to convert pdf file to JPG image
from pdf2image import convert_from_path
pdf_file_path = "path/to/pdf"
first_page = 16
last_page = 24
pages = convert_from_path(pdf_file_path, dpi=200, first_page=first_page, last_page=last_page, size=(3000, None))
page_count = first_page
for page in pages:
@mittalyashu
mittalyashu / materialDesignShadowHelper.less
Created December 18, 2018 13:56 — forked from gefangenimnetz/materialDesignShadowHelper.less
Less css box-shadow helper for cards & modals according to Googles Material Design spec.
/**
* A mixin which helps you to add depth to elements according to the Google Material Design spec:
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality
*
* Please note that the values given in the specification cannot be used as is. To create the same visual experience
* the blur parameter has to be doubled.
*
* Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp)
*
* Example usage:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@mittalyashu
mittalyashu / cloudSettings
Last active July 17, 2021 01:05
VS Code Settings
{"lastUpload":"2021-07-17T01:04:57.045Z","extensionVersion":"v3.4.3"}

Keybase proof

I hereby claim:

  • I am mittalyashu on github.
  • I am mittalyashu (https://keybase.io/mittalyashu) on keybase.
  • I have a public key ASAjhv-wcuCHqWCMkIJZ2Jjmgp0TN6c_SKjvRxJ7QqxGGgo

To claim this, I am signing this object:

@mittalyashu
mittalyashu / fetch_data_in_react.js
Created April 8, 2018 06:54
Fetch Data From RSS Feed In React
class FetchDataFromRSSFeed extends Component {
constructor() {
super();
this.state = {
recentBlogPost: {
name: '',
url: ''
}
}
}
@mittalyashu
mittalyashu / bcrypt_ext.md
Created September 9, 2017 15:03
How to fix this issue in Ruby on rails `cannot load such file -- bcrypt_ext`
C:\Users\Administrator>ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]

C:\Users\Administrator>gem list bcrypt

*** LOCAL GEMS ***

bcrypt (3.1.11 x64-mingw32)