Skip to content

Instantly share code, notes, and snippets.

View rohitfarmer's full-sized avatar

Rohit Farmer rohitfarmer

View GitHub Profile
@rohitfarmer
rohitfarmer / uses.md
Last active February 25, 2024 22:57
Uses

General computing software and tools that I use

Android

  1. LibreTube: a YouTube forntend (install it from F-droid)
  2. Fennec: a FireFox based web browser (install it from F-droid)
  3. FireFox Focus: privacy focused web browser by Mozilla

Cross platform or web based

  1. Microsoft OneNote: for collaborative notes
@rohitfarmer
rohitfarmer / find-files-in-linux.md
Created July 25, 2023 14:51
Find files in Linux

Find files recursively in the current folder

The commands below will produce a list of folder paths that contains the searched files.

find . -name "filename"

Note: replace . with the path to the folder if it's not the current folder.

Find files recursively in the current folder with a keyword in the file name

The commands below will produce a list of folder paths that contains the searched files.

@rohitfarmer
rohitfarmer / capitalization-in-titles-and-headings.md
Created August 31, 2022 17:49
Capitalization in titles and headings

Capitalization in Titles and Headings

Published on December 22, 2015 by Sarah Vinz. Revised on June 20, 2022. https://www.scribbr.com/academic-writing/capitalization-titles-headings/

There are three main options for capitalizing chapter and section headings within your dissertation:

  1. capitalizing all significant words
  2. capitalizing only the first word
  3. a combination of the two

Option 1: All significant words capitalized

@rohitfarmer
rohitfarmer / naming-files-and-folder.md
Last active August 31, 2022 18:00
Rules for naming files and folders that are cross platform.

Rules for Naming Files and Folders that are Cross Platform

Use styles that are internationally recognized, easy to read by a human eye, and require fewer finger movements on the keyboard, for example, using lowercase letters that eliminate the shift key.

  1. Use all lowercase letters.
  2. Use hyphens (not underscores) to separate words. Avoid using spaces as they are difficult to work with on the command line.
  3. Use YYYY-MM-DD format for dates. It is adapted from https://www.iso.org/iso-8601-date-and-time-format.html.
  4. While using the date at the beginning of a file name, keep the rest of the file name the same as the one created on a previous date (if there is more than one file for the same purpose, but it is sectioned according to the date.)
  5. Use "." only for file extensions.
  6. Use v1, v2, ..., vn to denote file versions.
@rohitfarmer
rohitfarmer / audio-video-linux.md
Last active February 18, 2024 01:12
Audio video file manipulation and editing in Linux

To Remove EXIF Information from an Image

Software required

sudo apt-get install libimage-exiftool-perl

View EXIF information

exiftool image.jpeg

Remove all EXIF information from a single file

exiftool -all= image.jpeg

@rohitfarmer
rohitfarmer / archive.md
Created July 26, 2022 19:05
File Compression and Archive

Create TAR Archives

An example from H5.

tar --exclude-vcs --exclude-backups --exclude=._* --exclude='Flow_15c' --exclude='h5n1_3.6_new_enet.sif' --exclude=temp* -zcvf h5n1_july_26_2022.tar.gz h5n1
@rohitfarmer
rohitfarmer / r-package.md
Created April 20, 2022 14:15
Commands related to building an R package.

Pkgdown

Before you run pkgdown related commands use KnitR to compile the README.Rmd file to README.md as it will be used as the homepage of the website.

To build pkgdown website for github pages through github actions pkgdown::build_site_github_pages()

@rohitfarmer
rohitfarmer / Docker.md
Last active April 12, 2022 16:49
Docker Commands

My Docker Cookbook

Listing

List all the running containers

# Shows both runnning and stopped containers
docker ps -a

Deleting

Delete Docker images

@rohitfarmer
rohitfarmer / build-singularity.md
Last active May 27, 2024 16:15
Instructions to build a singularity container with popular data science and chemistry packages, including Tensorflow.

Building a Singularity Container for Machine Learning, Data Science, & Chemistry

Learning Objectives

  1. Build a Linux based Singularity container.
    • First build a writable sandbox with essential elements.
    • Inspect the container.
    • Install additional software.
    • Convert the sandbox to a read-only SquashFS container image.
  2. Install software & packages from multiple sources.
  • Using apt-get package management system.