I hereby claim:
- I am srijanshetty on github.
- I am srijanshetty (https://keybase.io/srijanshetty) on keybase.
- I have a public key ASBp2Y-KsbCsRcnWRk-J2dX68fY1hX6NXsPfnhuobDbC0go
To claim this, I am signing this object:
| #!/usr/bin/bash | |
| gsettings set com.canonical.Unity.Lenses remote-content-search none; if [ "`/usr/bin/lsb_release -rs`" \< '13.10' ]; then sudo apt-get remove -y unity-lens-shopping; else gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"; fi; echo | sudo tee -a /etc/hosts; echo 127.0.0.1 productsearch.ubuntu.com | sudo tee -a /etc/hosts; |
| " copy all this into a vim buffer, save it, then... | |
| " source the file by typing :so % | |
| " Now the vim buffer acts like a specialized application for mastering vim | |
| " There are two queues, Study and Known. Depending how confident you feel | |
| " about the item you are currently learning, you can move it down several | |
| " positions, all the way to the end of the Study queue, or to the Known | |
| " queue. | |
| " type ,, (that's comma comma) |
| // Taken from David Walsh's blog | |
| var events = (function() { | |
| var topics = {}; | |
| return { | |
| subscribe: function(topic, listener) { | |
| if (!topics[topic]) { | |
| topics[topic] = { | |
| queue: [] | |
| }; |
| grep --binary-files=text --context=x 'stringfromyourfile' \ | |
| /dev/whateverPartition > someFile.txt |
| var once = function(fn, context) { | |
| return function() { | |
| if(!fn) { | |
| return undefined; | |
| } | |
| // We call the function only once | |
| fn.apply(context || this, arguments); | |
| // Set the function to null |
| I have marked with a * those which I think are absolutely essential | |
| Items for each section are sorted by oldest to newest. Come back soon for more! | |
| BASH | |
| * In bash, 'ctrl-r' searches your command history as you type | |
| - Input from the commandline as if it were a file by replacing | |
| 'command < file.in' with 'command <<< "some input text"' | |
| - '^' is a sed-like operator to replace chars from last command | |
| 'ls docs; ^docs^web^' is equal to 'ls web'. The second argument can be empty. | |
| * '!!:n' selects the nth argument of the last command, and '!$' the last arg |
| #!/bin/python | |
| def send_mail(): | |
| import smtplib | |
| gmail_user='' | |
| gmail_password='' | |
| FROM='' | |
| TO=['', ''] |
| # Install LAMP stack - Apache, MySQL, PHP | |
| # as per http://fideloper.com/ubuntu-install-php54-lamp and/or http://fideloper.com/ubuntu-12-04-lamp-server-setup | |
| sudo apt-get update # Update package repositories | |
| sudo apt-get install -y git-core wget vim curl build-essential python-software-properties zsh # Install basics | |
| sudo add-apt-repository -y ppa:ondrej/php5 # Add repository for php5.5 and Apache 2.4 | |
| sudo apt-get update # Update package repositories again after adding repository | |
| sudo apt-get install -y php5 php5-mcrypt php5-gd php5-curl php5-mysql # Install PHP and common modules | |
| sudo apt-get install -y apache2 libapache2-mod-php5 # Install Apache2 | |
| sudo apt-get install -y mysql-server # Install MySQL |
I hereby claim:
To claim this, I am signing this object: