Skip to content

Instantly share code, notes, and snippets.

View dorukcan's full-sized avatar

Dorukcan Kişin dorukcan

View GitHub Profile
#include <AutoItConstants.au3>
While(1)
;~ yazdır butonu
MouseClick($MOUSE_CLICK_LEFT, 469, 98, 1)
Sleep(1000)
;~ kaydet butonu
MouseClick($MOUSE_CLICK_LEFT, 249, 149, 1)
Sleep(1000)
@dorukcan
dorukcan / sort_elements.js
Last active June 18, 2019 07:35
sort elements in a block with descending order
var container = document.querySelector('#gwt-debug-logGroupTable tbody');
var items = Array.from(container.querySelectorAll("tr"));
var sortable = (item) => {
var sortKey = new Date(item.querySelector("td:last-child").textContent);
return sortKey.getTime();
};
items = items.sort((a, b) => {return sortable(a) == sortable(b) ? 0 : (sortable(a) < sortable(b) ? 1 : -1)});
container.innerHTML = items.map(item => item.outerHTML).join("");
var subs = $(".subreddits a").map(function(){
return $.trim($(this).text());
}).get();
var colors = ["#f3e5f5", "#e8eaf6", "#e3f2fd", "#e0f2f1", "#f1f8e9", "#fff8e1"];
$(".subreddits li").each(function(i, e){
var color = colors[i];
$(this).css("background-color", color);
var arr = d.aNodes;
document.write('<ul>')
getNodes(-1);
document.write('</ul>')
function getNodes(parentId) {
for (var i = 0; i < arr.length; i++) {
if (arr[i].parentid == parentId) {
if (arr[i].url == undefined) {
@dorukcan
dorukcan / sqldmp_windows.bat
Created August 11, 2017 14:58
sql dump scripts
powershell -noexit -executionpolicy bypass -File C:\wamp64\www\url\sqldmp_windows.ps1
@dorukcan
dorukcan / c0l0r.js
Last active December 14, 2017 10:03
if (!String.prototype.format) {
String.prototype.format = function () {
var args = arguments;
if (typeof arguments[0] === "object" && arguments.length === 1) {
args = arguments[0];
}
return this.replace(/{(\d+)}/g, function (match, index) {
return typeof args[index] !== 'undefined'
@dorukcan
dorukcan / CSV-Javascript.csv.js
Created December 23, 2017 13:45
intellij data extractor sqlite to mysql (for timestamps)
function eachWithIdx(iterable, f) {
var i = iterable.iterator();
var idx = 0;
while (i.hasNext()) f(i.next(), idx++);
}
function mapEach(iterable, f) {
var vs = [];
eachWithIdx(iterable, function (i) {
vs.push(f(i));
@dorukcan
dorukcan / find_installed_modules.py
Last active July 21, 2019 12:21
dummy pip freeze (so dummy that i didn't simplify the main loop, but it haz cool commentz lol)
import os
import re
from collections import Counter
def main():
result = []
# folder for starting scrape
start_folder = r"/Users/doruk/PycharmProjects/venus"
eksisozluk.com###videos
dizipub.com###video-oncesi
trakt.tv###huckster-desktop-wrapper
trakt.tv###charts-wrapper
trakt.tv###network-wrapper
trakt.tv###main-search
trakt.tv##a[href="/users/justkilled/year/*"] > .btn-dashboard.btn
trakt.tv##.stats-wrapper
; PSI Config File
;
; @category PHP
; @package PSI
; @author Michael Cramer <BigMichi1@users.sourceforge.net>
; @copyright 2009 phpSysInfo
; @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
; @version SVN: $Id: phpsysinfo.ini.new 705 2012-11-11 00:33:29Z namiltd $
; @link http://phpsysinfo.sourceforge.net