Skip to content

Instantly share code, notes, and snippets.

@piyushrajput
piyushrajput / http-errors.js
Created May 7, 2020 13:51 — forked from joyrexus/http-errors.js
HTTP Error classes in Node.js
'use strict';
const statusCodes = require('http').STATUS_CODES;
function createError(code, name) {
return function(message) {
Error.captureStackTrace(this, this.constructor);
this.name = name;
this.message = message;
this.statusCode = code;
}
@piyushrajput
piyushrajput / testTable.html
Created August 3, 2017 05:47
Table with no middle border for cells
<table>
<tbody>
<tr>
<td style="border-right:0px solid #000 !important;">
<iframe src="https://app.box.com/embed/preview/crj8xbocq90145ypwvngp81wvfgv2ntw?theme=dark" width="300" height="400" frameborder="0" allowfullscreen="" webkitallowfullscreen="" msallowfullscreen="">
</iframe>
</td>
<td style="border-left:0px solid #000 !important;">
<h2>Insurance Claim Demo Guide</h2>
<p>Get the help you need determining how much coverage may be right for you and your family
@piyushrajput
piyushrajput / export_google_music.js
Created June 2, 2017 06:15 — forked from jmiserez/export_google_music.js
(fixed/updated 2016-05-10) Export your Google Music Library and Playlists (Google Play Music All Access) (see http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music for more)
// Jeremie Miserez <[email protected]>, 2016
//
// A little bit of Javascript to let you export your Google Music library, playlists, and album track lists :)
//
// I posted this as an answer here: http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music
//
// 1. Go to: https://play.google.com/music/listen#/all (or your playlist)
//
// 2. Open a developer console (F12 for Chrome). Paste
// code below into the console.
@piyushrajput
piyushrajput / migrateCloud2Cloud.txt
Created October 13, 2016 22:13
How to migrate projects from one JIRA Cloud application to another
https://confluence.atlassian.com/jirakb/how-to-migrate-projects-from-one-jira-cloud-application-to-another-779160766.html
Purpose
At the present moment there is no project import available for JIRA Cloud applications. As a workaround customers can follow the guide in this KB.
Solution
(info) If the target instance has some data to be kept then please follow How to merge two different JIRA Cloud applications together.
If the target instance has nothing to be kept (clean new instance):
You can prepare a full export of your backup with attachments using the JIRA Backup Manager as per Exporting issues.
Import the backup generated above to your new Cloud instance as per How to restore a JIRA Cloud application backup into another JIRA Cloud application.
@piyushrajput
piyushrajput / File Search Data.json
Created October 3, 2016 17:11
File Search Data
{
"status": "success",
"result": {
"totalRecords": 24,
"nextPageToken": "16",
"listOfParents": [],
"listOfItems": [
{
"videoProvider": null,
"videoId": null,
@piyushrajput
piyushrajput / gist:4c044f47a01e49c20c269b353ab1c7a5
Created August 9, 2016 10:11
How To Secure Nginx with Let's Encrypt on CentOS 7
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-centos-7
http://www.tecmint.com/setup-https-with-lets-encrypt-ssl-certificate-for-nginx-on-centos/
@piyushrajput
piyushrajput / installNVM.txt
Created August 3, 2016 09:41
How to install NVM on CentOS
Pre-Flight Check
These instructions are intended specifically for installing NVM (Node Version Manager) on a single CentOS 7 node.
I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.
Step #1: Install NVM (Node Version Manager)
Use the following curl command to kick-off the install script:
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash
At the time of publication, NVM v0.25.0 was the most recent version available. You should check the GitHub project page for the latest release of NVM, and adjust the above command to include the newest version. For example, if the most recent version was 0.30.2, then your command would be similar to:
@piyushrajput
piyushrajput / gist:6a6949808616abea29b927883a5247b6
Created July 26, 2016 08:28
Fixing Notification Icon for Android Lollipop and Above
https://blog.clevertap.com/fixing-notification-icon-for-android-lollipop-and-above/
@piyushrajput
piyushrajput / installWebminFirewall.txt
Last active July 17, 2023 07:44
How To Install Webmin and Firewall On CentOS 7
Few day ago we showed you how to install Webmin on Ubuntu 14.10. This brief tutorial is going to show you how to install the same Webmin on a CentOS 7 machine.
For those who don’t know, Webmin is a web-based tool to mange every aspect of your Unix-like systems. From creating new accounts to managing file permissions to installing applications and services, Webmin allows you to perform all these tasks easily from any modern web browser.
Instead of using the command line console or terminal, new systems administrators could install Webmin and perform all system management from via a web browser without sacrificing time and efforts. Webmin also enables remotely management of your servers.
Before you continue with the installation, please make sure you have root level permissions to your system. If you don’t have root access the installation may fail.
@piyushrajput
piyushrajput / install-php-mcrypt.sh
Created July 22, 2016 06:37
install PHP mcrypt
# install EPEL with yum
yum -y install epel-release
# install php-mcrypt
yum -y install php-mcrypt