Skip to content

Instantly share code, notes, and snippets.

@sonerb
sonerb / hesap.py
Created December 20, 2021 19:51
donanimhaber for layk4t
hesaplar = [
{
"ad": "mehmet a",
"hesapNo": "8946534",
"bakiye": 2000,
"ekHesap": 1000
},
{
"ad": "ali b",
"hesapNo": "8946534",
using System;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form1 : Form
{
MyClass mc = new MyClass();
public Form1()
var DELAY_TIME = 100; // ms
var _POPUP = 0; // pop-up açılıp içine json yazılsın mı?
var _LOG = 1; // console ekranına json loglansın mı?
var _DOWNLOAD = 1; // .json formatında dosya olarak indirilsin mi?
var users = document.querySelectorAll("#pane-side > div:nth-child(1) > div > div > div");
var users_datas = [];
var users_container = document.querySelector("#pane-side");
function containsNo(no, list) {
var DELAY_TIME = 1000; // ms
var _POPUP = 0; // pop-up açılıp içine json yazılsın mı?
var _LOG = 1; // console ekranına json loglansın mı?
var _DOWNLOAD = 1; // .json formatında dosya olarak indirilsin mi?
var users = document.querySelectorAll(".copyable-area > div:nth-of-type(2) > div:nth-child(2) > div > div > div");
var users_datas = [];
var users_container = document.querySelector(".copyable-area > div:nth-of-type(2)");
function containsNo(no, list) {
@sonerb
sonerb / gittigidiyor.py
Created May 7, 2020 19:52
gittigidiyor.com product list
import requests
from bs4 import BeautifulSoup
def arama_yap(kelime):
url = "https://www.gittigidiyor.com/arama/?k=" + kelime
data = requests.get(url).content
soup = BeautifulSoup(data, "html.parser")
urunler = soup.select("li[class='gg-uw-6 gg-w-8 gg-d-8 gg-t-8 gg-m-24 gg-mw-12 catalog-seem-cell']")
for urun in urunler:
img_url = urun.select_one("p[class='image-container'] > img").get('sliderimg')
@sonerb
sonerb / lighttpd.conf
Created May 6, 2020 18:19
transmission-daemon lighttpd proxy config
$HTTP["url"] == "/transmission" {
url.redirect = ( "/transmission/web/" )
}
$HTTP["url"] =~ "/transmission*" {
proxy.server = ( "" =>
( (
"host" => "TRANSMISSION SERVER IP ADDRESS",
"port" => 9091 # TRANSMISSON RPC-PORT
) )
@sonerb
sonerb / twitter_unfollower
Created April 17, 2020 22:36
This script unfollow your followings except your followers for Twitter.
users = document.querySelectorAll("div[data-testid$=-unfollow]");
user_idx = 0;
function callReload()
{
users = document.querySelectorAll("div[data-testid$=-unfollow]");
user_idx = 0;
callClick();
}
$(document).ready(function () {
$(".btn-pro").click(function () {
var btn_submit = $(this);
$.ajax({
type: 'POST',
url: 'jproduct',
data: btn_submit.parentsUntil("form").serialize(),
import math
def round_up(floating_number, power=2):
return math.ceil(floating_number*(10**power)) / (10**power)
x = 1
y = 6
result = x/y
@sonerb
sonerb / phone_number_extractor.js
Created August 15, 2017 19:09
web.whatsapp.com phone number extractor
function download(data, filename, type) {
var file = new Blob([data], {type: type});
if (window.navigator.msSaveOrOpenBlob)
window.navigator.msSaveOrOpenBlob(file, filename);
else {
var a = document.createElement("a"),
url = URL.createObjectURL(file);
a.href = url;
a.download = filename;
document.body.appendChild(a);