Skip to content

Instantly share code, notes, and snippets.

View rohitfarmer's full-sized avatar

Rohit Farmer rohitfarmer

View GitHub Profile
@rohitfarmer
rohitfarmer / google.md
Last active October 17, 2018 23:21
Google Cloud Platform

To ssh to google compute engine instance.

First generate a ssh key pair on your local machine; use the username on the instance else it will create the user same as user on the local machine.

ssh-keygen -t rsa -f ~/.ssh/name -C username

chmod 400 ~/.ssh/name

Then login to your compute engine dashboard and click on metadata tab on the left. Go to ssh keys section and click edit,

@rohitfarmer
rohitfarmer / Linux_useful_commands.md
Last active October 29, 2018 16:21
Linux useful commands

Find

find /path/ -name filename* 2>/dev/null # This will redirect all the permission denied statements to null.

@rohitfarmer
rohitfarmer / dalnet.md
Last active December 25, 2025 17:00 — forked from xero/irc.md
irc cheat sheet

Link to docs: http://docs.dal.net/docs/chanserv.html

SSH connection to Dal Net: /connect -ssl punch.dal.net 6697

Identify nick name on dal net: /msg NickServ@services.dal.net IDENTIFY password

Change or set channel topic: /topic

@rohitfarmer
rohitfarmer / github.md
Last active May 17, 2022 14:15
My Git Cookbook

Git and GitHub

Configure your Git username/email

You typically configure your global username and email address after installing Git. However, you can do so now if you missed that step or want to make changes. After you set your global configuration, repository-specific configuration is optional.

Git configuration works the same across Windows, macOS, and Linux. To set your global username/email configuration:

@rohitfarmer
rohitfarmer / Python-Environment.md
Last active December 7, 2023 20:08
Create isolated python environment per project with all the packages needed for that particular project.

Python Virtual Environments

Create isolated python environment per project with all the packages needed for that particular project. Commands copied from https://realpython.com/python-virtual-environments-a-primer/.

Using the base module venv

Create the environment

python3 -m venv venv (name) --upgrade-deps
#!/usr/bin/env python
'''
Chemical data about a molecule.
Molecules are defined by SMILES strings. Can work out logP values, Lipinski's
rules, etc...
Uses rdkit
'''
@rohitfarmer
rohitfarmer / Linux_System_Admin.md
Last active November 14, 2018 22:44
Linux System Admin
@rohitfarmer
rohitfarmer / my-sqlite-cookbook.md
Last active January 25, 2025 15:13
Sqlite commands

My SQLite Cookbook

For general command line help
https://sqlite.org/cli.html

Open/attach a database

sqlite3 database.db

Show tables

.tables

@rohitfarmer
rohitfarmer / linux-network.txt
Created August 3, 2017 08:20
Linux network related commands
Verifying Which Ports Are Listening
-----------------------------------
#install nmap first
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Security_Guide/s1-server-ports.html
nmap -sT -O localhost
128.121.0.253
www.google.com etc
@rohitfarmer
rohitfarmer / tor.md
Last active February 11, 2024 00:23
Tor related stuff

To route everything running in a shell through tor

install tor
install torsocks

source torsocks on #everything in this particular shell will be routed through tor

Tor friendly websites