Skip to content

Instantly share code, notes, and snippets.

View dorukcan's full-sized avatar

Dorukcan Kişin dorukcan

View GitHub Profile
@dorukcan
dorukcan / gist:9e570892156b65ed9015
Created October 4, 2014 09:58
episodecalendar.com to trakt.tv
import requests
import hashlib
import json
def markaswatched():
"""
marks episodes which are marked on episodecalendar as seen on trakt. because episodecalendar forced me to buy premium version. fuck you episodecalendar.
http://trakt.tv/api-docs/show-episode-seen
"""
@dorukcan
dorukcan / eksi channel.js
Last active August 29, 2015 14:14
ekşi: set title channel
//these codes go to developer console of https://tr.wikipedia.org/wiki/Kategori:ABD%27li_kad%C4%B1n_pop_%C5%9Fark%C4%B1c%C4%B1-s%C3%B6z_yazarlar%C4%B1
var titles = [];
$('#mw-pages .mw-content-ltr li>a').each(function(){
titles.push( $(this).attr('title').replace( new RegExp(" \\(.*?\\)","gm"), '') );
});
arr.join();
//these codes go to any page of https://eksisozluk.com
var titles = "Eric Adams,Akon,Alan Arkin".split(','),
var alphabet = "ABCDEFGHIJKLMONPQRSTUVWXYZ ",
target = "METHINKS IT IS LIKE A WEASEL",
i, score = 0, copies, gen = 0, child = "";
String.prototype.replaceAt = function(index, character) {
return this.substr(0, index) + character + this.substr(index+1);
}
String.prototype.shuffle = function() {
var i = this.length, j, temp = this;
@dorukcan
dorukcan / followings who write most at recent 1000 tweet.py
Last active February 13, 2016 14:41
followings who write most at recent 1000 tweet
from twython import Twython
def main():
APP_KEY = ""
APP_SECRET = ""
OAUTH_TOKEN = ""
OAUTH_TOKEN_SECRET = ""
twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
my_timeline = twitter.get_home_timeline(count = 200)
@dorukcan
dorukcan / sort buddies.js
Last active August 29, 2015 14:15
sort buddies on ekşi sözlük
//run at console of https://eksisozluk.com/badi-engellenmis
$('head').append('<script type="text/javascript" src="https://mottie.github.io/tablesorter/js/jquery.tablesorter.js"></script>');
$('head').append('<link rel="stylesheet" type="text/css" href="https://mottie.github.io/tablesorter/css/theme.default.css">');
var badilist = [];
$('.relation-list').eq(0).find('a[href*=biri]').each(function(){
badilist.push($(this).attr('href'));
});
@dorukcan
dorukcan / login to eksisozluk.com.py
Created February 15, 2015 10:58
login to eksisozluk.com and work on the members-only stuff
import urllib, urllib2, cookielib, re
def login(email, password):
#giriş için gerekli ek değişkenler
returnUrl = '/'
rememberMe = 'true'
hiddenToken = ''
#request değişkenlerinin ilklendirilmesi
cj = cookielib.CookieJar()
@dorukcan
dorukcan / nppbackup.py
Created February 27, 2015 23:01
clear notepad++ backup files
import os
def main():
path = "C:\Users\Doruk\Desktop\NPP_BACKUP\\"
files = os.listdir(path)
before = files[0]
count = 0
@dorukcan
dorukcan / twitter_bot.py
Created September 19, 2015 10:44
twitter account creator
#-*- coding: utf-8 -*-
import urllib, urllib2, cookielib, re
import random, string, json
def create():
#request değişkenlerinin ilklendirilmesi
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
@dorukcan
dorukcan / dizipub_podcast_feed.py
Created October 20, 2015 20:08
creates a podcast feed file for using in beyondpod podcast application
import urllib2
import re
from BeautifulSoup import BeautifulSoup
from feedgen.feed import FeedGenerator
DIZI_TITLE = "Six Feet Under"
DIZI_MAIN_URL = "http://dizipub.com/dizi/six-feet-under-tum-bolumler-izle"
DIZI_LOGO = "http://images.popmatters.com/news_art/s/six-feet-under.jpg"
def downloadUrl(url):
@dorukcan
dorukcan / yemeksepeti_price_sort.js
Created October 22, 2015 19:26
sorts products by price on yemeksepeti.com
// ==UserScript==
// @name Yemeksepeti
// @namespace https://*.yemeksepeti.com/*
// @version 0.1
// @description sorts products by price on yemeksepeti.com
// @author dorukcan kişin
// @author https://twitter.com/johnpaulziller
// @grant none
// ==/UserScript==