Skip to content

Instantly share code, notes, and snippets.

@nautatva
nautatva / Make your life easy!.md
Last active May 26, 2019 10:27
give sudo access without requiring to enter password

user1 want to be able to 'su' to a specific user, without a password to be entered.

$ sudo visudo
$ user1 ALL=(ALL) NOPASSWD: /bin/bash

for all users
$ user1 ALL=(ALL) NOPASSWD: ALL

@nautatva
nautatva / Youtube_playlist_downloader.sh
Last active June 16, 2019 09:29
A Simple Shell Script To download youtube videos and playlists
#!/bin/bash
# A Simple Shell Script To download youtube videos and playlists
# Nautatava Navlakha - 16/Nov/2019
# Always install packages in virtual enviroment
`python3 -m venv env`
# Install youtube-dl
# Find the documentation at https://github.com/ytdl-org/youtube-dl
`pip install --upgrade youtube-dl`
@nautatva
nautatva / Internship-blog-scrapper.py
Created July 27, 2019 06:52
Scrape internship blog to get data in CSV
import requests
from bs4 import BeautifulSoup, Comment
import csv
from enum import Enum
# CSV: Job number, Job name, date opened, category, stipend, resume type
# Conf:
DEBUG = 1
ldap_user = ''
ldap_pass = ''
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done
for i in *.CR2; do sips -s format jpeg $i --out "{relative location}$i.jpg"; done
// relative location might be as simple as ./ or ../
def log(a):
print(a)
log("hello world")

Conventions

  • Git Etiquettes
  • PRs
  • Naming conventions

Git Etiquettes

  • Commits
  • Try to commit everyday
    • Messages: