Ducktype`d

A Technology Evangelist/Computer Scientist
  • /Know Me
  • /hire-me
  • ask me anything
  • rss
  • archive
  • GIT TIP#1 Using stash effectively

    everyone who uses GIT, knows about stash, here are some quick tip about using stash effectively

    1.) name those bastards (that are to be used in future) with

    git stash save <a-good-name>
    

    2.) just stash (if not to be used in future)

    git stash
    

    3.) pop, dont apply (if not to be used in future)(saves stash list from littering)

    git stash pop
    
    • 9 months ago
  • Comments
  • “Learning is like rowing upstream; not to advance is to drop back”
    • 9 months ago
  • Comments
  • Humongous: A Ruby MongoDB Browser

    Humongous: A Ruby way to browse and maintain MongoDB instances, using HTML5.

    Installation

    Command Line Utility

    Install the gem by running:

    gem install humongous --pre
    

    and run on terminal/console

    humongous
    

    And you are good to go it will open this in a browser or you can navigate it on port 9000. to stop it run:

    humongous -K
    

    here are options and values they take.

    -K or --kill  #kill the running process and exit
    -S, —status  #display the current running PID and URL then quit
    -s, —server SERVER #serve using SERVER (thin/mongrel/webrick)
    -o, —host HOST  #listen on HOST (default: 0.0.0.0)
    -p, —port PORT  #use PORT (default: 9000)
    -x, —no-proxy    #ignore env proxy settings (e.g. http_proxy)
    -F, —foreground  #don’t daemonize, run in the foreground
    -L, —no-launch   #don’t launch the browser
    -d, —debug        #raise the log level to :debug (default: :info)
    —app-dir APP_DIR  #set the app dir where files are stored(“~/.humongous”)
    -h, —help           #Show this message
    
    • 1 year ago
    • #mongodb
    • #Ruby
    • #ruby19
    • #sinatra
  • Comments
  • QuickTips Ruby1.9 [Part 3] Default and Splat arguments

    Ruby 1.9 has changed the way it used to deal with default arguments. The good news is it supports defaults arguments to be at beginning of methods. See gist below for example:

    You can continue to use default arguments at the end of method arguments as you were used to in 1.8.x, See example below

    But do note that you can not use both style of defining default arguments. Try it and you would get a syntax error raised.

    Splat arguments

    Ruby 1.9 also gives you free hand for defining splat argument anywhere in arguments list

    you can also define splat argument as last argument as you used to.

    Happy Coding :)

    • 2 years ago
    • #quicktips
    • #ruby18
    • #ruby19
    • #tips
    • #Tricks
  • Comments
© 2009–2013 Ducktype`d
Next page
  • Page 1 / 6