Skip to content

Instantly share code, notes, and snippets.

@mizanRahman
mizanRahman / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
  1. To enable rabbitmq management web interface:

    rabbitmq-plugins enable rabbitmq_management

  2. Default user is <> which can only be used for loopback interface (localhost). to access rabbitmq from clients running exernal machines, we need to create new users. we can create new users from mgmt web interface. lets say create a user with following credentials

    • username : omegapoint
    • password: 1234 also provide access to all elements of rabbitmq for this user.
  3. we can define exchange queue and bindings from web interface and also provide it in a configuration file, from where it will load configuraions on boot.

@mizanRahman
mizanRahman / plugins.md
Created January 13, 2015 04:37
sublime text plugins
  • AngularJs
  • grunt
  • htmlBeautify
  • jsbeautify
  • Git
  • GitGutter
  • Gist

#angularjs

workflow

  • yeoman
  • bower
  • grunt

Tools and libraries

  • Sass

Here is some sample problems to practice. please note that, problems are typical but can be solved in a compact way with python. try to find a pythonic way with python list and string comprehensions.

  • Reverse a String : Enter a string and the program will reverse it and print it out. sample input: "Hello" output: "olleH"

    ''' def reverse(some_seq):

  • Reverse a String : Enter a string and the program will reverse it and print it out. sample input: "Hello" output: "olleH"

  • Count Vowels: Enter a string and the program counts the number of each vowels in the text. sample input: "This is a sample input" output: a=2, e=0, i=3, o=0, u=1

## nuts and bolts of python
# Single line comments start with a number symbol.
""" Multiline strings can be written
using three "'s, and are often used
as comments
"""

python

  • Object oriented
  • Dynamic typed (Duck typed)
  • Cross platform
  • scripting or mission critical servers
  • interpreteed but bytecode compiled
  • easy to read, learn, maintain
  • simple yet robust
  • battaries included
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package poi_test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
{
"atomic_save": false,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": true,
"ensure_newline_at_eof_on_save": false,
"folder_exclude_patterns":
[
"node_modules",
".svn",