Skip to content

Instantly share code, notes, and snippets.

View nishad's full-sized avatar
🐢
I may be slow to respond.

Nishad Thalhath nishad

🐢
I may be slow to respond.
View GitHub Profile
#!/bin/bash
# Install csvkit with csvpys
# (csvpys hasn't been pulled back into the main csvkit repo that you can pip install)
git clone https://github.com/cypreess/csvkit.git
cd csvkit
python setup.py build
sudo python setup.py install
cd ~
@nishad
nishad / indiapost-pin-apigen.sh
Last active August 29, 2015 14:18
Simple script to generate static API for IndiaPost Pincodes csv Data
#!/usr/bin/env bash
# Simple script to generate static API for IndiaPost Pincodes
# This script requires csvkit, jq
# Make sure you did 'pip install csvkit' before running this script.
# Installation of jq is fairly simple, 'brew install jq' will do in Mac
# Get CSV dataset from
# https://data.gov.in/catalog/all-india-pincode-directory
@nishad
nishad / smaple.php
Last active August 29, 2015 14:23 — forked from laiso/smaple.php
<?php
/**
* Exite翻訳(英語→日本語)の野良API サンプル
*/
$text = 'This is a pen.';
$to = 'ENJA'; // ENJA or JAEN
$q = http_build_query(array(
'_id' => '6855579bdcb52e1a0a3822af4b5a9c88',
#!/bin/python
import requests
import re
def start():
chapter_links=[]
course="http://try.jquery.com/"
response=requests.get(course)
chapter_pattern=re.compile(r'(http[s]?://try.jquery.com/levels/\d)"')
<?php
/*
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch)
---------
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
<?php
snippet('header');
$tag = urldecode(param('tag'));
if(param('tag'))
$articles=$pages->visible()->filterBy('tags',$tag,',')->sortBy('date')->flip();
?>
<main class="main">
<section>
<h1><?php echo $page->title() . ' ' . $tag ?></h1>
@nishad
nishad / mubi.py
Created September 22, 2015 23:47 — forked from vchahun/mubi.py
Do some dark magic.
import os
import argparse
import requests
import progressbar
def main():
parser = argparse.ArgumentParser(description='All your MUBI are belong to us.')
parser.add_argument('film_id', type=int)
parser.add_argument('resolution', choices=('360p', '480p', '640w', '720w', '1280w'))
parser.add_argument('output_file')
@nishad
nishad / smi2srt.py
Created October 27, 2015 14:22
convert script in SMI to SRT format
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@package smi2srt
@brief this module is for convert .smi subtitle file into .srt subtitle
(Request by Alfred Chae)
Started : 2011/08/08
license: GPL
@nishad
nishad / index.php
Last active January 27, 2016 06:10 — forked from splitbrain/index.php
Text summary (Automated)
<?php
$OTS = '/usr/bin/ots';
loadurl();
if(!isset($_REQUEST['format']) || $_REQUEST['format'] =! 'text'){
header('Content-Type: text/html; charset=utf-8');
html_header();
form();
@nishad
nishad / index.php
Created March 11, 2016 02:01
Simple PHP Redirect
<?php
function Redirect($url, $permanent = false)
{
if (headers_sent() === false)
{
header('Location: ' . $url, true, ($permanent === true) ? 301 : 302);
}
exit();
}