Skip to content

Instantly share code, notes, and snippets.

@serdardalgic
serdardalgic / bumpme
Last active August 7, 2018 13:19
concourse tutorial
Tue Aug 7 13:19:06 UTC 2018

Keybase proof

I hereby claim:

  • I am serdardalgic on github.
  • I am serdard (https://keybase.io/serdard) on keybase.
  • I have a public key ASAHWkeR431I6labn18YE9mcaA5UeqCxJmXhmStvCK8yjwo

To claim this, I am signing this object:

@serdardalgic
serdardalgic / ruby_block_given
Created October 15, 2014 08:54
Ruby block_given and yield example
class MyArray
attr_reader :array
def initialize(array)
@array = array
end
def sum(initial_value = 0)
return array.inject(:+) + initial_value unless block_given?
sum = initial_value
def number_shuffle(number)
number.to_s.split("").permutation.to_a.inject([]) {|arr, el| arr << el.join.to_i}
end
@serdardalgic
serdardalgic / fourier_part1_rewrite.py
Created September 19, 2014 08:50
Haypat Fourier Transformation Rewrite
#!/usr/bin/python
import sys
import cmath
from math import pi
N = 100
c01 = [0.0] * N
cN1 = [0.0] * N
c02 = [0.0] * N
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
This file has been truncated, but you can view the full file.
DROP TABLE IF EXISTS `pk_il`;
CREATE TABLE `pk_il` (
`il_id` int(2) NOT NULL COMMENT 'plaka kodu',
`il_adi` varchar(255) NOT NULL,
PRIMARY KEY (`il_id`),
KEY `il_adi` (`il_adi`) USING BTREE
) ENGINE=MyISAM;
-- ----------------------------
INSERT INTO `pk_il` VALUES ('1', 'ADANA');
/*
Guncel BIN LISTESI
twitter : http://twitter.com/tserpico
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `binlist`
-- ----------------------------
/*
Türkiye İl ve İlçelerin enlem boylam bilgileri (dörtgen olarak sınır pozisyonlarıyla birlikte) kaynak : google maps (başarsoft)
twitter : http://twitter.com/tserpico
*/
DROP TABLE IF EXISTS `pk_il`;
CREATE TABLE `pk_il` (
`il_id` int(2) NOT NULL COMMENT 'plaka kodu',
`il_adi` varchar(255) NOT NULL,
`lat` double(20,8) DEFAULT NULL COMMENT 'enlem',
This file has been truncated, but you can view the full file.
/*
Türkiye'nin il, ilçe , semt, mahalle, posta kodu veritabanı
GÜNCEL : 19.04.2013
Kaynak : PTT
Oluşturan : http://www.twitter.com/tserpico
*/
DROP TABLE IF EXISTS `pk`;
CREATE TABLE `pk` (
`mahalle_id` bigint(10) NOT NULL AUTO_INCREMENT,