Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph Joice josephjoice

  • Student
  • Trivandrum
View GitHub Profile
View .zsrhrc.sh
#### FIG ENV VARIABLES ####
# Please make sure this block is at the start of this file.
[ -s ~/.fig/shell/pre.sh ] && source ~/.fig/shell/pre.sh
#### END FIG ENV VARIABLES ####
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
View .zpreztorc.sh
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
View .vimrc
set noswapfile
set clipboard=unnamed
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
View ksrtc.py
import requests
from subprocess import call
from bs4 import BeautifulSoup
for line in open("servicesTocheck.txt"):
params = line.split()
r=requests.get("http://www.ksrtc.in/oprs-web/forward/booking/avail/services.do?txtJourneyDate="+params[0]+"&startPlaceId="+params[1]+"&endPlaceId="+params[2]+"&ajaxAction=fw&singleLady=&qryType=0")
soup = BeautifulSoup(r.content,'html.parser')
try:
dontWantServices=params[3:]
except:
View servicesTocheck.txt
23/12/2016 1467467616730 1467490338079 1901BNGKTM 1958BNGKTM
22/12/2016 1467467616730 1467490338079 1901BNGKTM 1921BNGKTM
View config.ini
[gmail]
email=someemailid@gmail.com
pass=*******
to=someemailid
View sendMail.py
import smtplib
import ConfigParser
import sys
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.utils import formataddr
from email.header import Header
Config=ConfigParser.ConfigParser()
Config.read("config.ini")
@josephjoice
josephjoice / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console