Skip to content

Instantly share code, notes, and snippets.

<form name="deneme" method="POST" action="?yolla">
<select name="s_deneme">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select name="s_deneme2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
@sonerb
sonerb / giphy_gifs_lister.js
Created August 2, 2016 18:06
giphy gifs lister
var saveData = (function() {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function(data, fileName) {
blob = new Blob([data], {
type: "text/plain;charset=utf-8"
}),
url = window.URL.createObjectURL(blob);
a.href = url;
#coding:utf-8
def cizdir(boyut):
if boyut%2 == 0:
bosluk_sayi = int(boyut/2)-1
temp_bosluk_sayi = bosluk_sayi
for i in range(2,boyut,2):
my_str = ''
my_str += ' '*temp_bosluk_sayi
#coding:utf-8
import sys, os, time
from random import randint
is_path_ok = True
while(is_path_ok):
f_path = raw_input('Enter file path : ')
if os.path.exists(str(f_path)):
print('Path exists')
clear, clc;
is_while = 1;
while is_while
sonuc = 0;
a = input('Bir sayı giriniz : ', 's');
if strcmp(a, 'cikis')
@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);
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
$(document).ready(function () {
$(".btn-pro").click(function () {
var btn_submit = $(this);
$.ajax({
type: 'POST',
url: 'jproduct',
data: btn_submit.parentsUntil("form").serialize(),
@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();
}
@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
) )