Skip to content

Instantly share code, notes, and snippets.

View anaetrezve's full-sized avatar

Anaet Hossain anaetrezve

View GitHub Profile
@anaetrezve
anaetrezve / getCGPA.js
Created December 10, 2018 23:14
Get CGPA on browser console from ucam.uits.edu.bd. Just paste code to console When you at Course History page then hit Enter. Just it
let gpa = [];
let credits = [];
let creditFiltered = [];
let gpaFiltered = [];
let totalCredit;
let combined = 0;
let CGPA;
$("#ctl00_MainContainer_gvRegisteredCourse tr td:nth-child(7n)").each(
(i, c) => {
@anaetrezve
anaetrezve / js-console-scrapper.js
Created March 7, 2019 07:03
Scrap image, href, text from a page with javascript console
var variable = [];
document.querySelectorAll('selector').forEach(item => {
variable.push({
title: item.querySelector('a').textContent,
content: item.querySelector('h1').textContent,
permalink: item.querySelector(' a').getAttribute('href'),
image: item.querySelector(' selector').getAttribute('src'),
cat: (function() {
if (item.classList.contains('some class')) {
@anaetrezve
anaetrezve / js-console-table-data-scrapper.js
Created March 22, 2019 06:21
Simple DOM script to take table data from the page
var row = [];
document.querySelectorAll('enter your selector').forEach(item => {
var inner = {
title: '',
lists: []
};
item.querySelectorAll('innnnner seeeelector').forEach(innerItem => {
innerItem.querySelector('selector here') ? inner.lists.push(innerItem.querySelector('selector here').innerHTML.trim()) : inner.lists.push(innerItem.innerHTML.trim());
@anaetrezve
anaetrezve / docker-help.md
Created June 1, 2019 20:20 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@anaetrezve
anaetrezve / docker_wordpress.md
Created June 1, 2019 20:22 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@anaetrezve
anaetrezve / pipenv_cheat_sheet.md
Created June 1, 2019 20:22 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@anaetrezve
anaetrezve / django_deploy.md
Created June 1, 2019 20:22 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@anaetrezve
anaetrezve / django_cheat_sheet.md
Created June 1, 2019 20:23 — forked from bradtraversy/django_cheat_sheet.md
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
@anaetrezve
anaetrezve / webdev_online_resources.md
Created June 1, 2019 20:23 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)