Skip to content

Instantly share code, notes, and snippets.

View sghosh968's full-sized avatar

Suman Ghosh sghosh968

View GitHub Profile
@sghosh968
sghosh968 / React Native fastlane (deliver) articles.txt
Last active June 14, 2018 10:16
React Native fastlane (deliver) articles
https://docs.fastlane.tools/actions/deliver/
https://ionic.zone/fastlane/add-metadata-and-upload
https://github.com/fastlane/fastlane/issues/8036
@sghosh968
sghosh968 / nginx.conf
Created September 15, 2017 11:17
Test nginx configuration for react frontend app.
server {
listen 80;
listen 443 ssl;
server_name app.local;
ssl_certificate /Users/dyaus/workspace/ssl_certs/evisit.crt;
ssl_certificate_key /Users/dyaus/workspace/ssl_certs/evisit.key;
ssl_verify_client off;

Complete SELECT query

SELECT DISTINCT column, AGG_FUNC(column_or_expression), …
FROM mytable
    JOIN another_table
      ON mytable.column = another_table.column
    WHERE constraint_expression
    GROUP BY column
 HAVING constraint_expression
@sghosh968
sghosh968 / prepare-commit-msg.sh
Created July 27, 2017 10:51 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@sghosh968
sghosh968 / nginx_rewrite.txt
Created March 21, 2017 10:04
Rewrite HTTP to HTTPS in Nginx
Rewrite HTTP to HTTPS in Nginx
server {
listen 80;
server_name example1.com example2.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
@sghosh968
sghosh968 / keymap.cson
Created August 21, 2016 12:05
Change tab switch order to linear from MRU order in atom editor
Add the below code to keymap.cson :-
'body':
'ctrl-tab ^ctrl': 'unset!'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab ^ctrl': 'unset!'
'ctrl-shift-tab': 'pane:show-previous-item'
@sghosh968
sghosh968 / gist:43adf06cecc4ef0d6c5cfbfd0a4bb9ff
Created August 10, 2016 07:28
Fix for nokogiri installation issue in Macos (ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed)
Fix for the above issue is
gem install nokogiri -v 1.6.8 -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/
More info here :-
http://ruby.zigzo.com/2015/03/18/installing-nokogiri-on-yosemite/
@sghosh968
sghosh968 / .txt
Created July 28, 2016 11:27
nginx conf resources links
http://oskarhane.com/avoid-cors-with-nginx-proxy_pass/
http://serverfault.com/questions/384105/cross-origin-resource-sharing-cors-with-nginx-chrome
http://stackoverflow.com/questions/20078246/set-up-nginx-to-allow-cross-domain-request-for-subdomain
http://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains/12414239#12414239
@sghosh968
sghosh968 / ubuntu_package_source_list_issue.txt
Created May 19, 2016 13:56
Fix chrome related package source list issue in ubutnu
Most often we come across issues with source lists of packages in ubuntu, and most common among them is one below
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
FIX for the issue above
-----------------------
1. Open a new Terminal window and run the following command:
sudo gedit /etc/apt/sources.list.d/google-chrome.list
2. In the text file that opens edit the file so that the line reads: