Skip to content

Instantly share code, notes, and snippets.

View rahulspace's full-sized avatar
🚴‍♂️
Speed up

Rahul rahulspace

🚴‍♂️
Speed up
View GitHub Profile
@rahulspace
rahulspace / install-ionic.md
Last active February 18, 2018 15:37
Install ionic

Install node

$ sudo apt-get update

$ sudo apt-get install nodejs

Make sure node and npm installed successfully

$ node -v

$ npm -v

@rahulspace
rahulspace / git-setup.md
Last active March 4, 2018 15:23
Git Setup

Git Setup

Setting git user name

$ git config --global user.name "<user name>"

Setting git user email

$ git config --global user.email "<user email>"

Initialising git

$ git init

@rahulspace
rahulspace / upload app to iTunes connect.md
Last active April 26, 2018 06:20
upload app to iTunes connect

Upload app to iTunes Connect

  1. Sign in to iTunes Connect account https://itunesconnect.apple.com and accept the terms and services
  2. Click My Apps
  3. Click + and select New iOS App
  4. Fill these fields and click Create
    • Company Name : Name of company
    • Name : Name of app
    • Primary language : The language used to enter the details of app
  • Bundle ID : Unique ID to identify app for updates (can't change later)
@rahulspace
rahulspace / Upload apk to Google Play Store.md
Last active April 26, 2018 06:25
Upload apk to Google Play Store

Upload apk to Google Play Store

  1. log in into Google play account. https://play.google.com/apps/publish/
  2. Click All Applications then click + Add new application
  3. Select Default Language, type Title of app and click Upload APK
  4. Click Upload your first APK to Production and browse apk to upload
  5. Click Store Listing side menu
  6. Enter following details about the app
    • Title : App name
    • Short Description : Initial text that user will see
  • Full Description : Detailed description less than 4000 characters

###Visual Studio Code

CMD+P for search file in directory

@rahulspace
rahulspace / mongodb sharding with docker instances
Created August 22, 2019 06:50
mongodb sharding with docker instances
sudo mongod --configsvr --replSet csr --dbpath data/db/ --port 27019 --logpath /var/log/mongodb/mongod.log --bind_ip 0.0.0.0 --fork
rs.initiate({
_id: "csr",
configsvr: true,
members: [
{ _id: 0, host : "10.128.0.44:27019"},
{ _id: 1, host : "10.128.0.45:27019"},
]
})
@rahulspace
rahulspace / gist:08187b9480357b1e2194cd0fc05c1639
Created September 20, 2019 12:23
keywords generate from sentance
var message = 'a quick brown fox jumps over the lazy dog'
const splited = _.split(message, ' ')
var keywords = []
_.forEach(splited, (item, index) => {
for(var i = 0; i < splited.length ; i++) {
var data = _.take(splited, i + 1)
data = _.join(data, ' ')
keywords.push(data)
console.log(data)
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.2-common php7.2-cli php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-mbstring php7.2-bcmath php7.2-imap php7.2-xml php7.2-zip
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Commits count by author: git shortlog -s -n --all --no-merges
All insertions and deletions by author: git log --shortstat --pretty="%cE" | sed 's/\(.*\)@.*/\1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/\1 0 insertions\(+\), \2/;s/\(\+\)$/\(\+\), 0 deletions\(-\)/;s/insertions?\(\+\), //;s/ deletions?\(-\)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} {if ($1 != name && name != "") { print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net"; files=0; insertions=0; deletions=0; name=$1; } name=$1; files+=$2; insertions+=$3; deletions+=$4} END {print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net";}'