Skip to content

Instantly share code, notes, and snippets.

@ishu3101
ishu3101 / mac_software.sh
Created May 30, 2015
Quickly install Mac Software using Homebrew
View mac_software.sh
#!/bin/sh
# install the xcode Command Line Tools
xcode-select --install
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install homebrew-cask
brew tap phinze/homebrew-cask
@ishu3101
ishu3101 / os_settings.sh
Last active Aug 29, 2015
Change Preference/Settings in Mac using the terminal
View os_settings.sh
# always show tabs in terminal
defaults write com.Apple.Terminal ShowTabBar 1
# enable quick look of folders
defaults write com.apple.finder QLEnableXRayFolders -boolean YES
# allow quitting finder via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool YES; killall Finder
# show hidden files
@ishu3101
ishu3101 / read_arguments.py
Last active Sep 9, 2015
Read Command Line arguments using arg parse in Python
View read_arguments.py
#! /usr/bin/python
import argparse
parser = argparse.ArgumentParser(description="This is a test.")
parser.add_argument("-e", "--echo",
help="echo the string you use here", required = True)
parser.add_argument("-u", "--uppercase",
help="Echo data to uppercase", action="store_true")
parser.add_argument("-v", "--version", action='version', version='%(prog)s 1.0')
args = parser.parse_args()
@ishu3101
ishu3101 / 0_reuse_code.js
Last active Sep 10, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ishu3101
ishu3101 / javascript_resources.md
Last active Sep 10, 2015 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@ishu3101
ishu3101 / python_resources.md
Last active Sep 10, 2015 — forked from jookyboi/python_resources.md
Python-related modules and guides.
View python_resources.md

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@ishu3101
ishu3101 / rails_resources.md
Last active Sep 10, 2015 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.
View rails_resources.md

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@ishu3101
ishu3101 / css_resources.md
Last active Sep 10, 2015 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

View Get-InstalledSoftware.ps1
function Get-InstalledSoftware {
# .SYNOPSIS
# Get all installed from the Uninstall keys in the registry.
# .DESCRIPTION
# Read a list of installed software from each Uninstall key.
#
# This method provides an alternative to using the WMI class Win32_Product which causes an msi reconfiguration action.
#
# This CmdLet assumes the user is authenticated.
# .PARAMETER ComputerName
@ishu3101
ishu3101 / quotes.txt
Last active Nov 15, 2015
Inspirational Quotes
View quotes.txt
"If you want happiness for an hour take a nap. If you want happiness for a day go fishing. If you want happiness for a year inherit a fortune. If you want happiness for a lifetime, help someone else." - Chinese Proverb
"The secret of health for both mind and body is not to mourn for the past, worry about the future, or anticipate troubles, but to live in the present moment wisely and earnestly." - Buddha
"The way you think, the way you behave, the way you eat, can influence your life by 30 to 50 years." - Deepak Chopra
"Spread love everywhere you go. Let no one ever come to you without leaving happier." - Mother Teresa
"No matter how much pressure you feel at work, if you could find ways to relax for at least five minutes every hour, you'd be more productive." - Dr. Joyce Brothers
"Before you agree to do anything that might add even the smallest amount of stress to your life, ask yourself: What is my truest intention? Give yourself time to let a yes resound within you. When it's right, I guarantee that your e