Skip to content

Instantly share code, notes, and snippets.

View maaveran's full-sized avatar
🕉️
programmer, are you have any issue ?

Stephen Sanjaya maaveran

🕉️
programmer, are you have any issue ?
View GitHub Profile
@maaveran
maaveran / gitignore_per_git_branch.md
Created December 29, 2020 07:40 — forked from wizioo/gitignore_per_git_branch.md
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@maaveran
maaveran / docker.conf
Created November 16, 2020 07:42 — forked from victormongi/docker.conf
Docker + Nginx Loadbalancing
server {
listen 80;
# server_name http://app.test;
server_name https://172.31.9.19;
root /var/www/app;
index index.html index.php;
ssl on;
ssl_certificate /etc/ssl/vmdeloper.crt;
ssl_certificate_key /etc/ssl/vmdeloper.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@maaveran
maaveran / postgresql-node.js
Created May 16, 2018 09:17 — forked from nivesh2/postgresql-node.js
postgreSQL Db connect NodeJS
var pg = require('pg');
var config = require('config');
var conString = config.get('connectionString');
var db={
validateKey : function(key,callback){
var query={
"name":"validateKey",
"text":"SELECT user_id FROM USER_TABLE WHERE USERNAME =$1",
@maaveran
maaveran / test.js
Created April 25, 2018 15:56 — forked from radiofrequency/test.js
Puppeteer waitForBackboneEvent()
const puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch({
ignoreHTTPSErrors: true,
slowMo: 100,
headless: false,
args: ["--disable-notifications", "--ash-host-window-bounds 100+200-300x400"]
});