Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@prakashk
prakashk / default.py
Created July 18, 2019 02:58
default.py
# Einthusan.com plugin written by humla.
import os
import re
import urllib, urllib2
import xbmcplugin
import xbmcgui
import xbmcaddon
from datetime import date
@prakashk
prakashk / Florida-early-voting-schedule-2018.txt
Last active October 16, 2018 05:23
Florida Counties -- early voting schedule 2018
This is early voting schedule for 2018 General Election in all 67 of Florida counties.
Visit the page listed in the last column for information about voting locations.
|--------------+------------+-----------+------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------|
| County | Start Date | End Date | Times | For more information (voting locations etc), visit: |
|--------------+------------+-----------+------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------|
| Alachua | Oct 22 | Nov 3 | 9 AM - 6 PM | https://www.votealachua.com/Voters/Early-Voting
@prakashk
prakashk / emacs-eshell-display-remote-image-inline.el
Last active September 25, 2017 16:24
Display remote images in emacs eshell buffer
;; The stackoverflow answer https://emacs.stackexchange.com/a/9737
;; extends eshell/cat function to display images inline in *eshell*
;; buffer, so that
;;
;; eshell:~> cat my-image.png
;;
;; works just fine.
;;
;; However, this doesn't work if the eshell buffer's default-directory
;; is remote, and the image file is located on the remote host. cat just
import System.Environment (getArgs)
import Text.Parsec
import Text.Parsec.Prim
import Text.Parsec.Language
import qualified Text.Parsec.Token as T
import Control.Applicative ((<$>), (*>), (<*>), pure, liftA2)
import Data.List (intercalate)
type Parser = Parsec String ()
type Location = String
import System.Environment (getArgs)
import Text.Parsec
import Text.Parsec.Prim
import Text.Parsec.Language
import qualified Text.Parsec.Token as T
import Control.Applicative ((<$>), (*>), (<*>), pure, liftA2)
type Parser = Parsec String ()
type Location = String
type LocNode a = (Location, a)
import System.Environment (getArgs)
import Text.Parsec
import Text.Parsec.Prim
import Text.Parsec.Language
import qualified Text.Parsec.Token as T
import Control.Applicative ((<$>), (*>), (<*>), pure)
type Parser = Parsec String ()
-- AST
import System.Environment (getArgs)
import Text.Parsec
import Text.Parsec.Prim
import Text.Parsec.Language
import qualified Text.Parsec.Token as T
import Control.Applicative ((<$>), (*>))
type Parser = Parsec String ()
-- AST
@prakashk
prakashk / gist:e464478b2697c5ef2eaa
Last active August 29, 2015 14:01
Implementation of few haskell builtins
-- https://questhub.io/realm/haskell/quest/537bb4e2bbd0bed61d00007d
head :: [a] -> a
head [] = error "head: empty list"
head (x:xs) = x
tail :: [a] -> [a]
tail [] = error "tail: empty list"
tail (x:xs) = xs
@prakashk
prakashk / rename-lost-files-3.hs
Created April 21, 2014 20:46
rename lost files - v3
-- rename Project Euler files in git lost-found directory
-- get the file type and the problem number from the initial comments
-- in each file
import System.Environment
import System.Directory
import Text.Regex.Posix
import Control.Monad (forM_)
@prakashk
prakashk / rename-lost-files-2.hs
Created April 17, 2014 04:25
rename files in git lost-found directory - v2
-- rename Project Euler files in git lost-found directory
-- get the file type and the problem number from the initial comments
-- in each file
import System.Directory
import Text.Regex.Posix
import Control.Monad (forM_)
lostFilesDir = ".git/lost-found/other"