Skip to content

Instantly share code, notes, and snippets.

View nikhgupta's full-sized avatar
🏠
Working from home

Nikhil Gupta nikhgupta

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nikhgupta on github.
  • I am nikhg (https://keybase.io/nikhg) on keybase.
  • I have a public key ASAkCXCObEKam2xDO_HJfo8gOhYoFxsZ50s8QlDyELJkwQo

To claim this, I am signing this object:

# -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
class GoodreadsSpider(CrawlSpider):
name = 'goodreads'
allowed_domains = ['goodreads.com']
start_urls = ['https://www.goodreads.com/quotes']
# -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
class BrainyqouteSpider(CrawlSpider):
name = 'brainyquote'
allowed_domains = ['brainyquote.com']
start_urls = ['https://www.brainyquote.com/topics']
#!/usr/bin/env bash
BASE_DOMAIN="${1:-localhost.dev}"
cd /usr/local/etc/httpd
# Days for the cert to live
DAYS=3650
# A blank passphrase
PASSPHRASE=""
Verifying that "nikhgupta.id" is my Blockstack ID. https://onename.com/nikhgupta
@nikhgupta
nikhgupta / sample.html
Created October 22, 2016 15:09
Sample Files for Testing with Applications
<html>
<body>
<h1>Note</h1>
<p>Sent to <em>Tove</em> from <em>Jani</em> with heading <strong><em>Reminder</em></strong>
and body <strong>Don't forget me this weekend!</strong></p>
</body>
</html>
(defcustom erc-ignore-content '()
"Regular expressions to identify content to ignore.
Usually what happens is that you add the bots to
`erc-ignore-list' and the bot commands to this list."
:group 'erc
:type '(repeat regexp))
@nikhgupta
nikhgupta / vim-bundler-debug.sh
Created August 17, 2015 10:11
Debug script for vim-bundler with mini vimrc
$ pwd
/tmp/bundle
$ ls -al .
total 4
drwxr-xr-x 3 nikhgupta wheel 102 Aug 17 15:03 ./
drwxrwxrwt 16 root wheel 544 Aug 17 14:55 ../
$ cat ~/Code/__dotfiles/minivimrc/vimrc
set nocompatible
@nikhgupta
nikhgupta / evil-shift-right-and-indent-region
Last active August 29, 2015 14:23
Mapping in Evil mode to indent a region and shift it right.
(defun evil-shift-right-and-indent()
(interactive)
(evil-indent (region-beginning) (region-end))
(evil-shift-right (region-beginning) (region-end)))
(define-key evil-visual-state-map ">" 'shift-right-and-indent)
# RubyOnRails application template for building rapid prototyping of
# admin backends using ActiveAdmin, and other gem components.
#
# All the components (or features) added by this template are optional,
# and can be chosen (or removed) either by supplying relevant arguments
# on the command-line, or by answering the queries created by this
# template.
#
# This template is, highly, opinionated, and intentionally, kept as
# simple as possible, so that even the starters can just follow through,