Skip to content

Instantly share code, notes, and snippets.

View przbadu's full-sized avatar
🏠
Working from home

Pushpa Raj Badu przbadu

🏠
Working from home
View GitHub Profile

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@przbadu
przbadu / vimux.md
Last active August 29, 2015 14:19 — forked from fredv/vimux.md
@przbadu
przbadu / setup-react-redux-webpack.md
Last active June 22, 2017 10:50
Setup steps for react, redux, es6 using webpack
# This is example contains the bare mininum to get nginx going with
# unicorn servers. Generally these configuration settings
# are applicable to other HTTP application servers (and not just Ruby
# ones), so if you have one working well for proxying another app
# server, feel free to continue using it.
#
# The only setting we feel strongly about is the fail_timeout=0
# directive in the "upstream" block. max_fails=0 also has the same
# effect as fail_timeout=0 for current versions of nginx and may be
# used in its place.
@przbadu
przbadu / setup-rspec.md
Last active August 22, 2017 02:21
Common configurations for rspec-rails, shoulda-matchers, factory_girl_rails and database_cleaner

Setting up Rspec

Add required gems to Gemfile

group :development, :test do
  gem 'rspec-rails', '~> 3.5'
  gem 'shoulda-matchers'
  gem 'factory_girl_rails'
 gem 'database_cleaner', '~> 1.6.0'
@przbadu
przbadu / bulk-file-rename.rb
Last active January 22, 2017 03:32
Bulk rename files inside given directory path. Basically remove certain strings/text from the file name that we don't want in those file name and are common in all the files.
# Your directory path where all files are there which you want to rename
# without trailing / (slash)
dir_path = "your/dir/path/goes/here"
Dir.glob("#{dir_path}/*").each do |file|
# squeeze all whitespaces into single whitespaces
new_file_name = file.squeeze(' ')
base_name = File.basename(new_file_name)
if base_name.include?('Xamarin.Android Tutorial - ')
@przbadu
przbadu / GIF-Screencast-OSX.md
Created January 23, 2017 10:58 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@przbadu
przbadu / linking dotfiles.md
Last active March 18, 2017 11:44
how to link vim dotfiles

Installation

cd ~
git clone git@github.com:[username]/dotfiles.git
@przbadu
przbadu / Ctags.md
Last active March 9, 2024 13:25
Ctags for ruby on rails and node applications

Install ctags

http://ctags.sourceforge.net follow this url for installation and documentation.

Ctags with Ruby/Rails

We can ctags lots of programming languages. Here is how to do it for ruby/rails. I really like how RubyMine jumps to the source code (either withing project score or to the gem source). This is really useful for reading source code for those classes, methods, modules etc. But Now that I use vim as My IDE/Editor I really like that functionality to happen in my vim editor. And I found ctags as the solution.