Category: World

  • weblogger.el

    This post is being posted by webblog.el module of emacs.

  • Vim on ipad

    Was looking for a emacs clone on ipad, but it seems emacs uses lots of lisp and as per Apple’s store policies, can’t have an application on iPhone and IPads which uses code which can internally execute processes or may traverse across the application boundaries or the internals of the system, hence emacs is not ported and after some googling I figured out it never will be since, emacs does believe in the freedom and Apple otherwise.

    Though, I manage to download vim clone for ipad(and I am sure vim does uses some scripts).

  • Famous emacs users(who are not famous for using emacs)

    Was using emacs from quite sometime as my primary editor for two reasons one as to learn more about emacs as an editor and two a wonderful platform to do many things. And during my learning curve came across this page created by “Wenshan” and this list is just amazing.

    http://wenshanren.org/?p=418

    But of course using emacs will not end up making me a great programmer, so these relatively known people and me might only thing in common is we used emacs at some point of time(or may have kept using).

  • Pop up windows in kde and gnome.

    I use this primarily to pop up something while I am usually working on doing some coding and need a reminder.

    zenity –info –text “Remember the milk”

    This pops up a window telling me what to do. Setting this with “at” helps me schedule it too.

  • Summary of disk…

    Summary of disk usage, excluding other filesystems, summarised and sorted by size

    du -xks * | sort -n

  • Programming languages

    curl http://en.wikipedia.org/wiki/List_of_programming_languages | grep "li>" | awk -F"title=" '{ print $2 }' | awk -F\" '{ print $2 }'

    list all programming launguages

  • $ ps axu | grep…

    $ ps axu | grep [a]pache2

    grep processes list avoiding the grep itself

  • Notepad in a browser (type this in the URL bar)

    $ data:text/html, <html contenteditable>

    It doesn’t save your notes, but it’s great for jotting something down quickly.

  • Run the built in PHP-server in current folder

    php -S 127.0.0.1:8080

     

    You must have PHP 5.4.0 or later to be able to run the built in server.
    This web server is designed for developmental purposes only, and should not be used in production.

  • Synchronise date and time of server over ssh

    $ date –set=”$(ssh user@server ‘date -u’)”

  • Find the start time of a process.

    $ ps -eo pid,lstart,cmd

    Alternatively you can also use,
    $ ls -l /proc/pid

  • Query Wikipedia over console

    dig +short txt .wp.dg.cx

  • Simple http server

    python -m SimpleHTTPServer

  • Find the top 10 largest directories

    $ find . -type d -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {} | sort -rn

  • Kill a broken ssh connection.

    $ ~.
    This is useful for example if you are on ssh in a server and the server goes down without letting you out.

    This is part of a larget sets of escape sequences provided by ssh. You can find them with ~? Here’s the list:

    ~. – terminate connection (and any multiplexed sessions)

    ~B – send a BREAK to the remote system

    ~C – open a command line

    ~R – request rekey

    ~V/v – decrease/increase verbosity (LogLevel)

    ~^Z – suspend ssh

    ~# – list forwarded connections

    ~& – background ssh (when waiting for connections to terminate)

    ~? – this message

    ~~ – send the escape character by typing it twice

    (Note that escapes are only recognized immediately after newline.)

    View this command to comment, vote or add to favourites
    View all commands by carlesso

    by David Winterbottom (codeinthehole.com)

  • Find the population of the world

    $ curl –silent http://www.census.gov/population/international/ | grep wclocknum | sed -r ‘s#^.*>([0-9,]+)<.*$#\1#'

  • Show directory tree

    $ find . -type d | sed -e “s/[^-][^\/]*\// |/g” -e “s/|\([^ ]\)/|-\1/”

  • Psgrepp

    $ ps aux | grep $(echo $1 | sed “s/^\(.\)/[\1]/g”)