Skip to content

Instantly share code, notes, and snippets.

View dorukcan's full-sized avatar

Dorukcan Kişin dorukcan

View GitHub Profile
for (i = 2; i <= 14; i++) {
$.get("https://www.ayrintiyayinlari.com.tr/ucuzlatilmis-kitaplar/s/" + i, function(data) {
var html = $.parseHTML(data);
$(html).find(".span9 .editor .box").appendTo(".span9 .editor>div:eq(0)");
});
}
//---------------------------------------------------------------------------------------------------------------------------
var arr = $(".box").get();
//MODULE TRANSFER
var result = [];
jQuery("#system-modules fieldset").each(function() {
jQuery(this).find(".form-checkbox").each(function() {
result.push([jQuery(this).attr("id"), jQuery(this).attr("checked")]);
});
});
console.log(JSON.stringify(result))
values = [];
import urllib2, json, sqlite3
from peewee import *
def getSummonerId(name, api_key):
url = "https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/by-name/" + name + "?api_key=" + api_key
data = urllib2.urlopen(url).read()
jsonData = json.loads(data)
return jsonData[name.lower()]["id"]
def getMatches(s_id, region, api_key):
@dorukcan
dorukcan / auto_install_windows_updates.au3
Last active April 20, 2016 14:20
Runs windows update standalone files which have been downloaded by http://www.windowsupdatesdownloader.com/
#include <File.au3>
#RequireAdmin
Local $location = "C:\Users\dorukcan\Documents\Windows Updates Downloader\Non-Security Updates\"
Local $aFileList = _FileListToArray($location, "*")
For $i = 1 To $aFileList[0]
;open file
ShellExecute($location & $aFileList[$i])
ConsoleWrite($i & " " & $aFileList[$i] & @CRLF)
@dorukcan
dorukcan / bcp.py
Last active November 6, 2017 10:21
A simple clone of Boun Course Planner
# -*- coding: utf-8 -*-
import datetime
import re
import requests
from bs4 import BeautifulSoup
from sqlalchemy import *
"""
Güney Kampüs
@ECHO OFF
cd %~dp1
ECHO Compiling %~nx1.......
IF EXIST %~n1.class (
DEL %~n1.class
)
javac %~nx1
IF EXIST %~n1.class (
ECHO -----------OUTPUT-----------
java %~n1
var COURSES = [
["EC", "101", "09", "N", null],
["TK", "221", "51", "C", null],
["LIT", "211", "02", "N", null],
["MATH", "102", "01", "N", "MATH102 F"],
["PHYS", "102", "01", "N", "PHYS102 F"],
["FA", "48P", "01", "N", "PHYS125 F"],
];
for (i = 0; i < COURSES.length; i++) {
@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==
@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 / 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))