Skip to content

Instantly share code, notes, and snippets.

🔳
lost in the shell

Mischievous Meerkat jarun

🔳
lost in the shell
Block or report user

Report or block jarun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jarun
jarun / Goa tips.md
Last active Apr 8, 2019
Notes from Goa, India trip (22 Oct 2017)
View Goa tips.md

Sunset at Benaulim

  1. Use Google Maps, save Goa offline for quick access. Jio works everywhere.
  2. Buy hats. Goa is hot and humid (between Feb to Dec).
  3. If you reach Madgaon by train and want to go to North Goa, take an auto to the Madgaon Bus stand (around Rs. 120). Book a ticket for the non-stop express bus to the Panjim Bus stand. At Panjim Bus stand, take a KTC prepaid taxi to North Goa.
  4. A nice place to homestay is Joe and Marietta's guesthouse, Calangute Goa. They have all amenities like AC, fridge, hot water, wifi... It's very near to KFC. They will provide numbers to cab and bike services too. But do NOT buy petrol from them even if the lady insists. They charged Rs. 80/ltr when the petrol price in Goa was Rs. 52/ltr on the day. There are petrol pumps everywhere. One can stay in North Goa and visit Old Goa + Panjim by bike.
  5. Autos and cabs will cost you dearly. Hire a bike for a few days (~Rs. 300/day for Honda Activa). No Uber or Ola, thanks to govt
@jarun
jarun / remexe.py
Created Oct 4, 2017
Remove executable permission for media files recursively
View remexe.py
#!/usr/bin/env python3
import os
import stat
extns = ['.aac', '.avi', '.flac', '.m3u', '.m4a', '.mkv', '.mp3', '.mp4', '.smi', '.srt', '.sub', '.webm', '.wma']
for root, dirs, files in os.walk('.'):
for entry in files:
fname, ext = os.path.splitext(entry)
@jarun
jarun / elinks.md
Last active Sep 3, 2017
Tips to improve elinks experience
View elinks.md
@jarun
jarun / gmail_cmdline.md
Last active Sep 2, 2017
How to send emails (with Gmail as SMTP server) from the cmdline when 2-Step Verification is ON
View gmail_cmdline.md

Generate an App password for your Google account. Select the custom option from the drop-down menu. The password will work with any of the utilities below.

Compose, 'sendemail' with attachment

  1. Install sendemail and dependencies

    sudo apt install libio-socket-ssl-perl libnet-ssleay-perl libterm-readkey-perl sendemail
    
  2. Apply patch1 to simplify the mailing experience

    sudo patch /usr/bin/sendEmail < sendEmail-1.56-5.patch
    
@jarun
jarun / cupcakes.md
Last active Jan 16, 2020
Random collection of useful commands
View cupcakes.md

A collection of awesome commands, functions, aliases to save your time

Play random music from your media storage:
# BASH shell

boom()                                                                           
{                                                                                
    find $@ -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.webm" -o -iname "*.wma" \) | sort -R | head -n 100 | xargs -d "\n" smplayer > /dev/null 2>&1 &
@jarun
jarun / timer.c
Created Jul 5, 2017
microsec timer in C for profiling
View timer.c
#include <iostream>
#include <sys/time.h>
int main()
{
struct timeval t1, t2;
double elapsedTime;
// start timer
gettimeofday(&t1, NULL);
@jarun
jarun / apps.md
Last active Sep 5, 2018
New interesting apps for Ubuntu
View apps.md
View stock_scripts.md

Covert currency:

#!/bin/bash

wget -qO- "http://www.google.com/finance/converter?a=$1&from=$2&to=$3" |  sed '/res/!d;s/<[^>]*>//g';

Get stock price:

curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=avgo&f=l1'
@jarun
jarun / chrome_extensions.md
Last active Jul 6, 2018
A collection of useful Google Chrome extensions
View chrome_extensions.md
@jarun
jarun / python timeit
Created Mar 5, 2017
Quick template for python timeit
View python timeit
#!/usr/bin/env python3
import timeit
'''
plus_stmt = """
row1 = 'hello world'
row2 = 'hello worlds'
out = '- [' + row2 + '](' + row1 + ')'
"""
You can’t perform that action at this time.