Skip to content

Instantly share code, notes, and snippets.

View sajibsrs's full-sized avatar
🤔
Demystifying...

Sajidur Rahman sajibsrs

🤔
Demystifying...
View GitHub Profile
@sajibsrs
sajibsrs / top_50_imdb_animated_movie_2015.py
Last active March 12, 2016 19:19
A simple python program to get the list of top 50 animated movies of 2015.
from lxml import html
import requests
from operator import itemgetter, attrgetter, methodcaller
# IMDB search listing page for "Animated movies 2015"
page = requests.get('http://www.imdb.com/search/title?genres=animation&sort=moviemeter,asc&title_type=feature&year=2015')
tree = html.fromstring(page.content)
# This will create a list of movie names
get_names = tree.xpath('//td[@class="title"]/a/text()')
@sajibsrs
sajibsrs / custom-woo-loop.php
Created July 25, 2017 21:51
Woocommerce 3 + custom featured product by category loop, exclude subcategories
$term = get_queried_object();
$tax_query = array(
array(
'taxonomy' => 'product_cat',
'field' => 'id',
'terms' => $term->term_id,
'include_children' => false // If you want to disable subcategories
),
@sajibsrs
sajibsrs / content_single_product.php
Last active August 5, 2017 11:40
Woocommerce 3+ posts related to product - Related posts in product page
// Custom WP query to get posts by current product category slug
$args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => $cats[0],
'posts_per_page' => 4,

YouTube Channel https://www.youtube.com/c/jerrylokjianming


How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/