Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Anoob Bava anoobbava

🎯
Focusing
Block or report user

Report or block anoobbava

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anoobbava
anoobbava / .zshrc
Last active May 3, 2019
Web development guide tools
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/sarath/.oh-my-zsh"
export PATH="$(brew --prefix qt@5.5)/bin:$PATH"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
View rspec_cheatsheet_controller_spec.rb
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
View NavBar.vue
<template>
<!-- display the navigation bar -->
<v-toolbar>
<v-toolbar-items>
<v-btn
flat
tag='span'
style='cursor: pointer'
>
SHOW CASE
@anoobbava
anoobbava / installing-node-with-nvm.md
Created Jan 29, 2019 — forked from d2s/installing-node-with-nvm.md
Installing Node.js for Linux & macOS with nvm
View installing-node-with-nvm.md
@anoobbava
anoobbava / post-checkout
Created Oct 4, 2018 — forked from flesler/post-checkout
git hook to run a command after `git pull` and `git checkout` if a specified file was change for example, package.json or bower.json
View post-checkout
#!/usr/bin/env bash
# fork from https://gist.github.com/jakemhiller/d342ad51505addf78ec628a16fd3280f
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
}
check_run package.json "npm prune && npm install"
@anoobbava
anoobbava / default
Last active Jul 2, 2018
sites enabled configuration for deploying the blog_app >> for blogging purpose , dont delete this file
View default
upstream app {
# Path to Unicorn SOCK file, as defined previously
server unix:/home/anoob.bava/blog_app/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
@anoobbava
anoobbava / deploy_to_check_master.rb
Created Jun 29, 2018 — forked from jbonney/deploy.rb
Mina deployment file to setup new host for Rails applications. Creates the folder structure, fill up the database.yml file, create the associated DB and user and set up new Apache virtual host file.
View deploy_to_check_master.rb
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
# Usually mina focuses on deploying to one host and the deploy options are therefore simple.
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to
# specify the host that we are targeting.
server = ENV['server']
# Since the same host can have multiple applications running in parallel, it is necessary to
@anoobbava
anoobbava / deploy.rb
Last active Jul 2, 2018
my deploy.rb which is used for blog_app deployment only staging >> for blog app >> blogging >> dont delete
View deploy.rb
require 'mina/git'
require 'mina/bundler'
require 'mina/rails'
require 'mina/unicorn'
require 'mina/rvm'
# preset defaults
set :application_name, 'blog_app'
set :domain, '35.231.73.143'
set :deploy_to, '/home/anoob.bava/blog_app'
@anoobbava
anoobbava / deploy_skeleton.rb
Last active Jun 29, 2018
this is only a skeleton of the deploy.rb and this used for blogging
View deploy_skeleton.rb
# added all the dependencies
#ex: require "this" or "that" etc
# preset defaults
set :application_name, 'your application name, say like a repo name'
set :domain, 'ip address of the server or domain name'
set :deploy_to, 'to where the app to be installed'
set :repository, 'repo link'
set :branch, 'branch may be staging, qa,production etc'
set :user, 'to which user is deploying the app'
@anoobbava
anoobbava / unicorn.rb
Created Jun 28, 2018
put this file in the config/unicorn.rb used for blog don't delete
View unicorn.rb
# encoding: utf-8
# Set your full path to application.
app_dir = File.expand_path('../../', __FILE__)
shared_dir = File.expand_path('../../../shared/', __FILE__)
# Set unicorn options
worker_processes 2
preload_app true
timeout 30
You can’t perform that action at this time.