Skip to content

Instantly share code, notes, and snippets.

View skihero's full-sized avatar

Kish skihero

  • Amazon Mechanical Turk
  • Ooty
View GitHub Profile
@skihero
skihero / GetMatchScore.py
Created March 30, 2011 14:36
Gets the match scores a script in python
'''
Script to periodically check the Cricket scores from a website
and print it to a window
Window part is yet to be done,
Thinking of using Tkinter with its glorious always on the top mode.
Kish
''''
/*
* Creating classes to learn a bit about java
*/
/**
* Super hero classes
*/
/**
* All our super heros belong to this class
@skihero
skihero / gist:86b829ec37d88e63b0c6afe647953f09
Created June 17, 2022 12:55
Movie Agora text translation
Late 4th century AD The Roman Empire began to collapse
Alexandria in the province of Egypt, still preserved part of its splendor. It owned one of the 7 wonders of the ancient world. the legendary lighthouse, and the largest known library.
The library was not only a cultural symbol. But religious a place where the pagans worshiped their ancestral gods.
The traditional pagan cult now coexisted in the city with the Jewish. And with an unstoppable religion, until recently Christianity was prohibited
****
After taking the library, many pagans converted to Christianity and Alexandria experienced a period of peace.
@skihero
skihero / AutoHotkey.ahk
Last active July 4, 2020 08:34
Bind Winkey and u to press Shift and up key x number of times
*#c::Run Calc.exe
#n::
Run Notepad
return
#u::Send +{Up 10}
#j::Send +{Down 10}
#a::
Send {Home 20}
CoordMode, Mouse, Screen
@skihero
skihero / epoll_test.c
Created December 19, 2013 14:27
Re learning mode. A bit of play with epoll
/*
* Program to serve many client request without blocking
* using epoll
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/epoll.h>
@skihero
skihero / gist:7909983
Created December 11, 2013 12:57
swap ctrl and caps with setxkbmap
/usr/bin/setxkbmap -option "ctrl:swapcaps"
@skihero
skihero / sele_title
Created December 10, 2013 05:53
sel py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
chromedriver= '/tmp/chromedriver'
os.environ["webdriver.chrome.driver"] = chromedriver
browser = webdriver.Chrome(chromedriver)
browser.get('http://www.site.com')
assert 'site' in browser.title
@skihero
skihero / gist:5046841
Created February 27, 2013 10:09
error: unpacking of archive failed on file /usr/sbin/haproxy;512ddaaa: cpio: Digest mismatch
Was trying to create an rpm from the installed haproxy binaries.
Ran into this problem.
Turns out we need to do a prelink -u haproxy on the binary that we're packaging.
The binary had come from a different machine than the place where we're building it.
@skihero
skihero / get_cost_softlayer_api_hardware
Created October 3, 2012 19:37
Get costs of hardware using softlayer api
get '/costs' do
begin
account_service = SoftLayer::Service.new("SoftLayer_Account")
costs= account_service.object_mask({"hardware" => ["id", "hostname","notes", "cost"]}).getHardware
rescue
@error = "Error fetching cost details !! "
end
@skihero
skihero / basketball_doodle_google
Created August 8, 2012 14:15
Play google basketball doodle
import pyatspi
import time
time.sleep(5)
count=0
for i in range (1, 10000) :
pyatspi.Registry.generateKeyboardEvent(65, None, pyatspi.KEY_PRESSRELEASE)
count=count+1
if count < 33:
time.sleep(0.5107)