Skip to content

Instantly share code, notes, and snippets.

View batuhan's full-sized avatar
📟

batuhan içöz batuhan

📟
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>begum form</title>
</head>
<body>
<form id="ogrenci" method="post" action="">
@batuhan
batuhan / index.html
Created March 4, 2012 16:05
FBIDFinder.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Facebook ID Finder, Batuhan's Social Tools</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Facebook ID Finder is a very simple open-source tool to easily learn your Facebook ID.">
<meta name="author" content="Batuhan Icoz">
<style>
@batuhan
batuhan / file1.php
Created October 29, 2011 23:43
kategori
<?php
echo 'contents';
function parsePageSignedRequest() {
if (isset($_REQUEST['signed_request'])) {
$encoded_sig = null;
$payload = null;
list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);
$sig = base64_decode(strtr($encoded_sig, '-_', '+/'));
$data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));
return $data;
}
return false;
@batuhan
batuhan / httpd.conf
Created October 10, 2011 19:28
OS X Lion Apache2 Default httpd.conf
#
# Mac OS X / Mac OS X Server
# The <IfDefine> blocks segregate server-specific directives
# and also directives that only apply when Web Sharing or
# server Web Service (as opposed to other services that need Apache) is on.
# The launchd plist sets appropriate Define parameters.
# Generally, desktop has no vhosts and server does; server has added modules,
# custom virtual hosts are only activated when Web Service is on, and
# default document root and personal web sites at ~username are only
# activated when Web Sharing is on.
@batuhan
batuhan / simple_contact.php
Created September 9, 2011 23:32
simple contact form shortcode (for wp)
<?php
/*
Plugin Name: Simple Contact Form (Shortcode)
Plugin URI: http://beyn.org/
Description: A simple contact form. Usage: [b_form email="send@form.here"]
Version: 0.1.1
Author: Barış Ünver
Author URI: http://beyn.org/
*/
@batuhan
batuhan / tw_follow.php
Created August 21, 2011 20:18
twitter follow /for erdinç
<?php
include 'twitter.class.php'; // http://svn.strawp.net/lib/twitter.class.php
$tw = new TwitterClient();
$users_to_follow = 'batuhanicoz,razyocom,kaloglu,razyocom';
$users = explode(',', $users_to_follow);
foreach($users as $user){
@batuhan
batuhan / is_offensive.php
Created August 17, 2011 17:11
Is offensive?
<?php
//checks if text contains any offensive words, returns boolean.
function is_offensive($text){
$data = file_get_contents('http://www.wdyl.com/profanity?q='.$text);
$data = json_decode($data);
@batuhan
batuhan / makeslug.php
Created August 15, 2011 13:58
Make slug
<?php
// source: http://neo22s.com/
function friendly_url($url) {
// everything to lower and no spaces begin or end
$url = strtolower(trim($url));
//replace accent characters, depends your language is needed
//$url=replace_accents($url);
@batuhan
batuhan / convert_test.php
Created August 1, 2011 14:35
convert time (broken)
<?php
error_reporting(E_ALL);
//second test
$zaman = 'Fri, 01 Jul 2011 16:24:27 +0000';
$dateResult = date( 'y-m-d', strtotime($zaman) );
echo $dateResult;