This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import hmac, base64, struct, hashlib, time, subprocess | |
# change this parameters | |
vpn_entry_name = 'aws-vpn' | |
otp_secret = 'your OTP secret' | |
# change this parameters | |
h = hmac.new(base64.b32decode(otp_secret, True), struct.pack(">Q", int(time.time())//30), hashlib.sha1).digest() | |
o = ord(h[19]) & 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vergikimlik(kno) { | |
var v1 = 0; | |
var v2 = 0; | |
var v3 = 0; | |
var v4 = 0; | |
var v5 = 0; | |
var v6 = 0; | |
var v7 = 0; | |
var v8 = 0; | |
var v9 = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function vergiKimlikDogrulama($vkno) { | |
$vkno = preg_replace('/\D/ui','',$vkno); | |
if (strlen($vkno) == 10) { | |
$vkno_array = str_split(strval($vkno)); | |
$v1 = (intval($vkno_array[0]) + 9) % 10; | |
$v2 = (intval($vkno_array[1]) + 8) % 10; | |
$v3 = (intval($vkno_array[2]) + 7) % 10; | |
$v4 = (intval($vkno_array[3]) + 6) % 10; |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
function range_leading_zero($start,$end,$size, $step=1){ | |
$arr = range($start,$end,$step); | |
$filtered_arr = array_map(function($digit) use ($size) {return sprintf("%0".$size."d", $digit);},$arr); | |
//var_export($filtered_arr); | |
return array_unique(array_merge($arr, $filtered_arr)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo(){ | |
to=$1 | |
repo_path=/home/works/www/${to} | |
if [ -d "${repo_path}" ]; then | |
cd ${repo_path} | |
else | |
echo "repo bulunamadi: ${repo_path}" | |
fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# kadri demir [email protected] | |
# thanks to Valery Kotlarov @ www.webdesignpatterns.org | |
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then | |
CAN_I_RUN_SUDO=$(sudo -n uptime 2>&1|grep "load"|wc -l) | |
if [ ${CAN_I_RUN_SUDO} -gt 0 ] | |
then | |
sudo su -c "$0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// See related links for more status codes | |
// Use this header instruction to fix 404 headers | |
// produced by url rewriting... | |
header('HTTP/1.1 200 OK'); | |
// Page was not found: | |
header('HTTP/1.1 404 Not Found'); | |