Skip to content

Instantly share code, notes, and snippets.

View eashish93's full-sized avatar

Ashish Rawat eashish93

View GitHub Profile
@eashish93
eashish93 / googledrive.py
Created February 23, 2017 17:21 — forked from remitamine/googledrive.py
youtube-dl extractor for Google Drive
from .common import InfoExtractor
from ..utils import RegexNotFoundError
class GoogleDriveIE(InfoExtractor):
_VALID_URL = r'(?:https?://)?(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/(?:uc\?.*?id=|file/d/))(?P<id>.+?)(?:&|/|$)'
_formats = {
'5': {'ext': 'flv'},
'6': {'ext': 'flv'},
'13': {'ext': '3gp'},
'17': {'ext': '3gp'},
@eashish93
eashish93 / ghostpaginate.md
Last active May 17, 2024 02:01
Ghost numbered pagination

Hye, this is custom numbered pagination with first, next and prev links. Also the user can limit the pagination numbers. Just include this code in pagination.hbs file inside ghost theme partials directory. Any improvements are always welcome.

{{!-- custom pagination file --}}

<nav class="pagination" role="navigation">
    {{#if prev}}
    <a class="prev" href="{{page_url prev}}">&larr; Prev</a>
@eashish93
eashish93 / SongsListContainer.js
Last active May 17, 2024 02:01
React separating presentation and logic (smart-dumb component)
import React, { Component } from 'react';
import Request from 'superagent';
// Logic (Smart)
class SongsListContainer extends Component {
constructor(props) {
super(props);
this.state = {meta: []}
}
componentDidMount() {