Skip to content

Instantly share code, notes, and snippets.

Dipesh Bhardwaj Dev-Dipesh

Block or report user

Report or block Dev-Dipesh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Dev-Dipesh
Dev-Dipesh / boostnote.md
Created May 14, 2019
Boostnote Cheatsheet
View boostnote.md

📋 📘 Boostnote Markdown CheatSheet

The missing markdown feature cheat sheet for Boostnote.
It tries to give a short summary of all formatting options which are available in Boostnote.


⚠️ Only works in Boostnote.
👉 Open the Preview Page to see how it's rendered.
🈴 Chinese Version

@Dev-Dipesh
Dev-Dipesh / ffmpeg-install.sh
Created Oct 17, 2018 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
View ffmpeg-install.sh
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
View My Sublime 3 settings
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Oceanic Next Color Scheme/Oceanic Next.tmTheme",
"draw_white_space": "all",
"font_face": "Fira Mono",
"font_size": 20,
"tab_size": 2,
"theme": "Brogrammer.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
@Dev-Dipesh
Dev-Dipesh / ServiceWorker.md
Last active Jul 11, 2017
Understanding Service Worker
View ServiceWorker.md

Service Worker

The Goal of this gist is to help understand service worker. It's not for diving deep in the core, but to understand the concepts, benefits and trade offs.

I have listed three resources which helped me greatly to unfurl the curtains:

Service Worker Status

View mitchell_ms_sqlV2.js
const sql = require("mssql");
require("msnodesqlv8");
const conn = new sql.Connection({
database: "db_name",
server: "server_name",
driver: "msnodesqlv8",
options: {
trustedConnection: true
}
};
@Dev-Dipesh
Dev-Dipesh / rabbitmq_notes.md
Last active Jun 18, 2019
Why RabbitMQ is better over Redis and notes on RabbitMq.
View rabbitmq_notes.md

Redis is Database whereas RabbitMQ was designed as a message router or message-orientated-middleware (mom), so I'm sure if you look for benchmarks, you'll find that RabbitMQ will outperform Redis when it comes to message routing.

RabbitMQ is written in Erlang which was specifically designed by the telecom industry to route messages, you get clustering out of the box due to it being written in Erlang which means in a clustered environment, RabbitMQ will outperform Redis even further.

Furthermore, you get guaranteed delivery of messages due to the AMQP protocol, in other words, if the network drops while consuming the message, the consumer won't be able to say thanks for the message, so the consumer will drop the message and Rabbit will requeue the message, if you publish a message and the queue didn't say thanks to the publisher due to network problems or timeouts, Rabbit will drop the message and the publisher will keep on trying to publish the message. You can have publish retries with backoff policies, so

@Dev-Dipesh
Dev-Dipesh / kue_issues_debugging.md
Last active Oct 24, 2016
Kue (priority job queue) error debugging and repairs - Thanks to @dfoody ( https://github.com/dfoody )
View kue_issues_debugging.md

Project: Kue (https://github.com/Automattic/kue)

Issue: https://github.com/Automattic/kue/issues/130

Here's the rough set of steps we typically follow to repair various kue issues we see regularly: (note that some of these apply only to our fork - that has the ability to do "locks" so jobs for - in our case - a single user are serialized (users are differentiated based on their email address).

Failed Jobs Not Showing When there are failed jobs (the sidebar says non-zero), but none show in the list, use the follow this procedure to repair them:

@Dev-Dipesh
Dev-Dipesh / go-redis-amz-ami.md
Last active Oct 21, 2016
Golang and Redis Setup on Amazon 64 bit AMI Linux
View go-redis-amz-ami.md

Update Server

sudo yum -y update
sudo yum -y install gcc make

Golang Installation

Download Go binary

@Dev-Dipesh
Dev-Dipesh / nginx-ssl.md
Last active Sep 1, 2019
Setting SSL/TLS in Nginx Using Godaddy as CA Provider
View nginx-ssl.md

CA PROVIDER - GODADDY

Certificates

Ones you have generated, downloaded and extracted the certificate zip, you will find 2 files in it:

  • gd_bundle-g2-g1.crt Intermediate Certificate
  • RANDOM_NUM.crt Your SSL Certificate

Creating single chained certificate

View web-scrapping.js
/**
* GET /api/scraping
* Web scraping example using Cheerio library.
*/
exports.getScraping = function(req, res, next) {
cheerio = require('cheerio');
request = require('request');
request.get('https://news.ycombinator.com/', function(err, request, body) {
if (err) return next(err);
You can’t perform that action at this time.