Skip to content

Instantly share code, notes, and snippets.

View hex128's full-sized avatar
👾

Hex hex128

👾
View GitHub Profile
@hex128
hex128 / uz.java
Created February 26, 2015 01:52
Application for querying remaining places from UZ
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
@hex128
hex128 / uz.sh
Last active January 21, 2017 12:03
Script for querying remaining places for UZ
#!/usr/bin/env sh
# Script for querying remaining places from UZ
# Requires curl, grep, jq and nodejs
LANG="en"
DESCRIPTION="Script for querying remaining places from UZ"
USAGE="Usage: $(basename "${0}") <start_station> <end_station> [MM.DD.YYYY]"
DEPENDENCIES="Please make sure that curl, grep, jq and Node.JS are installed"
CURL=$(command -v "curl")
GREP=$(command -v "grep")
#!/usr/bin/python2
# -*- coding: utf-8 -*-
import sys, signal, httplib, urllib, json
# Ловим ^C
def user_interrupt(signal, frame):
sys.exit(0)
signal.signal(signal.SIGINT,user_interrupt)
kiev = "2200001"