Skip to content

Instantly share code, notes, and snippets.

View Form1.cs
using System;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form1 : Form
{
MyClass mc = new MyClass();
public Form1()
View wp_get_chat_users.js
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) {
View wp_user_collector.js
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
gittigidiyor.com product list
View gittigidiyor.py
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
transmission-daemon lighttpd proxy config
View lighttpd.conf
$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 Apr 17, 2020
This script unfollow your followings except your followers for Twitter.
View twitter_unfollower
users = document.querySelectorAll("div[data-testid$=-unfollow]");
user_idx = 0;
function callReload()
{
users = document.querySelectorAll("div[data-testid$=-unfollow]");
user_idx = 0;
callClick();
}
View gist:69925f55255ed67363f4fbaa8a7b4227
$(document).ready(function () {
$(".btn-pro").click(function () {
var btn_submit = $(this);
$.ajax({
type: 'POST',
url: 'jproduct',
data: btn_submit.parentsUntil("form").serialize(),
View python_round_up.py
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 Aug 15, 2017
web.whatsapp.com phone number extractor
View phone_number_extractor.js
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);
View factoriyel.m
clear, clc;
is_while = 1;
while is_while
sonuc = 0;
a = input('Bir sayı giriniz : ', 's');
if strcmp(a, 'cikis')