Skip to content

Instantly share code, notes, and snippets.

View kcparashar's full-sized avatar
💭
I may be slow to respond.

Krishna Parashar kcparashar

💭
I may be slow to respond.
View GitHub Profile
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'sjl/gundo.vim'
Plugin 'kien/ctrlp.vim'
@kcparashar
kcparashar / test.js
Created March 30, 2018 00:25
Non working attempt for Ampersand JS Coding Challenge
// Given a string of numbers and operators,
// print out all the different ways you can add parentheses
// to force the order of operations to be explicit,
// and the result for running the operations in that order.
// No weird inputs, everything is separated by one space.
// Supported operators are +, *, -, = (for the = operator, if the values are the same return 1, otherwise return 0)
// Print your results sorted numerically
// Don't worry about the input expression size being too large
// Your code should be written in javascript
@kcparashar
kcparashar / reserved_usernames.rb
Created October 3, 2017 23:28 — forked from caseyohara/reserved_usernames.rb
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@kcparashar
kcparashar / 00-intro.md
Created December 20, 2016 10:06 — forked from mdo/00-intro.md
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

\documentclass[11pt]{article}
\usepackage{amsmath,textcomp,amssymb,geometry,graphicx,enumitem, hyperref}
\def\Name{NAME} % Your name
\def\Class{CS161}
\def\SID{SID} % Your student ID number
\def\Login{cs161-xx} % Your login (your class account, cs170-xy)
\def\Homework{3}%Number of Homework
\def\Session{Spring 2016}
\def\Collaborators{None}
@kcparashar
kcparashar / simple.js
Created July 12, 2016 05:13
Scrape Simple Data using Phantom.js
'use strict';
var Q = require('q');
function main(stdout, env, Nightmare) {
const creds = {
username: () => Q(env.SIMPLE_USERNAME),
password: () => Q(env.SIMPLE_PASSWORD)
};
@kcparashar
kcparashar / README.md
Created March 22, 2016 19:19 — forked from Carpetfizz/README.md
Craigslist scraper for finding new apartments

Craigslist housing scraper

Still very much a WIP but it gets the job done.

Usage

  1. pip install -r requirements.txt
  2. Replace WATCH_URL and BASE_URL in scraper.py
  3. python3 scraper.py output_file
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@kcparashar
kcparashar / egg
Last active February 7, 2016 04:05
#!/usr/bin/env python
### Memory Address
# Memory Address of the Start of Door : 0xbffff7d8
# Memory Address of RIP ($eip) : 0xbffff7ec
# Size of the Buffer Padding : 0xbffff7d8 - 0xbffff7ec = 20 bytes
# Return Pointer : 0xbffff7ec + 4 = 0xbffff7f0
### Login Information
@kcparashar
kcparashar / config.json
Created July 24, 2015 19:34 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",