Skip to content

Instantly share code, notes, and snippets.

Soner sonerb

Block or report user

Report or block sonerb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:69925f55255ed67363f4fbaa8a7b4227
$(document).ready(function () {
$(".btn-pro").click(function () {
var btn_submit = $(this);
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 / phone_number_extractor.js
Created Aug 15, 2017 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; = filename;
View factoriyel.m
clear, clc;
is_while = 1;
while is_while
sonuc = 0;
a = input('Bir sayı giriniz : ', 's');
if strcmp(a, 'cikis')
View gist:2f51c10fec974c4ff8880a0add08f6e6
import sys, os, time
from random import randint
is_path_ok = True
f_path = raw_input('Enter file path : ')
if os.path.exists(str(f_path)):
print('Path exists')
View gist:486d3e31f10521fc96a4e663794f1c74
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
View giphy_gifs_lister.js
var saveData = (function() {
var a = document.createElement("a");
document.body.appendChild(a); = "display: none";
return function(data, fileName) {
blob = new Blob([data], {
type: "text/plain;charset=utf-8"
url = window.URL.createObjectURL(blob);
a.href = url;
View test_form.php
<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 name="s_deneme2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
You can’t perform that action at this time.