Skip to content

Instantly share code, notes, and snippets.

Dorukcan Kişin dorukcan

  • İstanbul
Block or report user

Report or block dorukcan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dorukcan
dorukcan / gist:9e570892156b65ed9015
Created Oct 4, 2014
episodecalendar.com to trakt.tv
View gist:9e570892156b65ed9015
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 Aug 29, 2015
ekşi: set title channel
View eksi channel.js
//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(','),
View weasel program.js
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 / last.fm statistics.js
Last active Aug 29, 2015
a scratch to use last.fm api
View last.fm statistics.js
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
var today_start, from, to, link, i,
result = [],
user = 'dorukcank',
apikey = '6658d01a1a36d9cc7e4afb5463ac1706';
today_start = new Date(new Date().toDateString() + ' 00:00:00').getTime() / 1000 + 2*60*60;
@dorukcan
dorukcan / followings who write most at recent 1000 tweet.py
Last active Feb 13, 2016
followings who write most at recent 1000 tweet
View followings who write most at recent 1000 tweet.py
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 Aug 29, 2015
sort buddies on ekşi sözlük
View sort buddies.js
//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 Feb 15, 2015
login to eksisozluk.com and work on the members-only stuff
View login to eksisozluk.com.py
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 Feb 27, 2015
clear notepad++ backup files
View nppbackup.py
import os
def main():
path = "C:\Users\Doruk\Desktop\NPP_BACKUP\\"
files = os.listdir(path)
before = files[0]
count = 0
@dorukcan
dorukcan / lastfm_today.js
Last active Aug 29, 2015
what did i listen today
View lastfm_today.js
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
var link = 'http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks';
link = link + '&format=json&limit=200';
link = link + '&from=' + Math.ceil(Date.now()/1000 - 24*60*60);
link = link + '&user=dorukcank';
link = link + '&api_key=6658d01a1a36d9cc7e4afb5463ac1706';
@dorukcan
dorukcan / twitter_bot.py
Created Sep 19, 2015
twitter account creator
View twitter_bot.py
#-*- 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))
You can’t perform that action at this time.