Skip to content

Instantly share code, notes, and snippets.

View Utshaw's full-sized avatar
🎯
Focusing

Farhan Tanvir Utshaw

🎯
Focusing
View GitHub Profile
@Utshaw
Utshaw / beautiful-soup-4
Last active December 27, 2018 06:10
Python
import bs4 as bs
import urllib.request
source = urllib.request.urlopen('https://pythonprogramming.net/parsememcparseface/')
soup = bs.BeautifulSoup(source, "lxml") # str(soup) gets entire HTML source file
# soup.nav # returns first nav element inside soup
# soup.nav.div # returns first nav's first div element
@Utshaw
Utshaw / gitignore
Created December 26, 2018 11:26
git
source for knowledge: https://git-scm.com/docs/gitignore
gitignore guidelines:
dir_to_ignore/ # to ignore dir_to_ignore directory
@Utshaw
Utshaw / virtualenv-commands
Last active February 7, 2021 19:08
Python-virtualenv-commands
# ref: https://www.youtube.com/watch?v=N5vscPTWKOk
sudo apt-get install python3-pip
sudo pip3 install virtualenv
virtualenv project_virtual_env # create a virtual environment on current python folder
source ./project_virtual_env/bin/activate # activate virtual environment
which python # now see, python refers to current environment's python
pip list # list all packages on this environment
pip freeze --local # show local dependencies on python environment
@Utshaw
Utshaw / .gitignore_for_android
Created December 29, 2018 12:03
.gitignore for android
# Built application files
/*/build/
build/*
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
@Utshaw
Utshaw / cpp-snippet-vscode
Last active December 30, 2018 03:35
vscode c++ snippet
{
"Template for C++ code": {
"prefix": "cpp",
"body": [ "#include <iostream>\n#include <bits/stdc++.h>\n\nusing namespace std;\n\n#define endl '\\n'\n\nint main() {\n\t$0\n\n\treturn 0;\n}" ]
,
"description": ""
}
}
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
@Utshaw
Utshaw / mysql-start-stop
Created January 2, 2019 07:21
start and stop mysql
sudo service mysql start
sudo service mysql stop
@Utshaw
Utshaw / jdk-path-ubuntu
Created January 2, 2019 11:59
JDK path for ubuntu
/usr/lib/jvm/java-10-oracle
@Utshaw
Utshaw / lfs
Created February 21, 2019 04:21
git lfs
# install git lfs : https://askubuntu.com/questions/799341/how-to-install-git-lfs-on-ubuntu-16-04
# track files and commit, push: https://git-lfs.github.com./
@Utshaw
Utshaw / cpp-boilerplate-template.cpp
Last active July 5, 2019 03:06
cpp boilerplate template for visual studio code
{
// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",