Skip to content

Instantly share code, notes, and snippets.

View prosenjit-manna's full-sized avatar
🎯
Focusing

Prosenjit Manna prosenjit-manna

🎯
Focusing
  • Itobuz Technologies
View GitHub Profile
# Create a file .huskyrc with this content and placed in ~/.huskyrc
# ~/.huskyrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
#########################################
########## Wordpress core files #########
#########################################
*.htaccess
/wp-admin/
/wp-includes/
/*.php
/*.html
/*.txt
## These variable should be set in Bitbucket repository
## If you want to try in local system without bitbucket pipeline
## You can do so with update variable value
## One thing is required collect Aws ssh key for ssh connect
## Create a ssh key in Aws server and add public key in your bitbucket account
## Otherwise this code will not work
# export WP_PROD_ROOT_PATH="/var/www/html/pipelines/wp-testing";\
# export DB_NAME_PROD="wppipelineprod";\
image: itobuz/itobuz-aws
pipelines:
branches:
master:
- step:
script:
- ./deploy.sh

settings.json file should be placed under root folder of workspace under .vscode directory

@prosenjit-manna
prosenjit-manna / isElementInViewport.js
Created November 30, 2018 10:24 — forked from davidtheclark/isElementInViewport.js
JavaScript: Is element in viewport?
/*
No jQuery necessary.
Thanks to Dan's StackOverflow answer for this:
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
*/
function isElementInViewport(el) {
var rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
@prosenjit-manna
prosenjit-manna / encoding-video.md
Created September 6, 2018 15:25 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
158 apt-get install network-manger-openvpn-gnome -y
159 apt-get install network-manager-openvpn-gnome
160 apt-get install network-manager-pptp -y
161 apt-get install network-manager-gnome -y
162 apt-get install network-manager-strongswan -y
163 apt-get install network-manager-vpnc -y
164 apt-get install network-manager-vpnc-gnome -y
touch /etc/apt/sources.list
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
sudo apt-get install ~/Downloads/timedoctorpro_1.4.75-15ubuntu17.04_amd64.deb
apt --fix-broken install
apt-get install dh-autoreconf libnfc-dev libssl-dev
apt-get install synaptic
apt-get install libssl1.0.0
@prosenjit-manna
prosenjit-manna / index.js Capture DOM element screenshot using Chrome headless | Jest screenshot
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'});