Skip to content

Instantly share code, notes, and snippets.

View farukcam's full-sized avatar
🐢
I may be slow to respond.

Faruk Çam farukcam

🐢
I may be slow to respond.
View GitHub Profile
@Eomerx
Eomerx / validate-tc-id.js
Last active October 13, 2022 17:47
Validate TC ID
//=======================================
// CHECK TC ID =
//=======================================
var checkTcNum = function(value) {
value = value.toString();
var isEleven = /^[0-9]{11}$/.test(value);
var totalX = 0;
for (var i = 0; i < 10; i++) {
totalX += Number(value.substr(i, 1));
}
@sebastianheuer
sebastianheuer / token.php
Last active May 11, 2018 06:40
Unique Token Generator in PHP
<?php
/**
* Token Generator
*
* Generates a unique hashed token using various sources for random data
*/
class Token
{
/**
* @var string
@ziyahan
ziyahan / gist:3938729
Created October 23, 2012 13:28
Vergi Kimlik No Doğrulama Algoritması
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;
@sgmurphy
sgmurphy / url_slug.php
Created July 12, 2012 15:52
URL Slugs in PHP (with UTF-8 and Transliteration Support)
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
@linssen
linssen / the_includes.html
Created May 23, 2012 08:23
Extending the jQuery Sortable With Ajax & MYSQL
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script><link rel='stylesheet' href='styles.css' type='text/css' media='all' />
@MatthewEppelsheimer
MatthewEppelsheimer / country-shortcode.php
Last active February 27, 2023 11:44
WP Contact Form 7 shortcode with list of Countries
<?php
/*
Localizations:
- [Spanish](https://gist.github.com/MatthewEppelsheimer/1498955#gistcomment-3317461) props @chdgp
UPDATED: 2020-03-09