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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="tr" lang="tr"> | |
<head> | |
<title> JSON Encoder </title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<?php | |
if($_POST) { | |
$unicodes = array('\u015f', '\u015e', '\u011f', '\u011e', '\u0130', '\u0131', '\u00fc', '\u00dc', '\u00d6', '\u00f6', '\u00c7', '\u00e7'); |
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
var timer = { | |
started: 0, | |
end: 0, | |
now: function(){ return new Date(); }, | |
start: function(){ return this.started = this.now(); }, | |
since: function(){ this.end = this.now(); return this.now()-this.started; } | |
} | |
// Usage: |
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
/* | |
* Flash runs fireFlashEvent function with a event name parameter and | |
* several optional parameters. Javascript can listen these events by | |
* binding with addFlashEventListener function. | |
* | |
* Requires jQuery | |
*/ | |
// Global Document object for caching $(document) selector | |
Document = null; |
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 python | |
""" | |
requires simplejson module (https://github.com/simplejson/simplejson) | |
Usage example: | |
tail -f /var/log/json.log | grep "muratcorlu.com" | python json.py log.date log.url | |
"2011.12.14 14:21" "http://muratcorlu.com/post/archieve/" | |
"2011.12.14 14:29" "http://muratcorlu.com/" |
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
# coding=utf-8 | |
""" | |
Kurallar: | |
* 11 hanelidir. | |
* Her hanesi rakamsal değer içerir. | |
* İlk hane 0 olamaz. | |
* 1. 3. 5. 7. ve 9. hanelerin toplamının 7 katından, 2. 4. 6. ve 8. hanelerin toplamı çıkartıldığında, elde edilen sonucun 10'a bölümünden kalan, yani Mod10'u bize 10. haneyi verir. | |
* 1. 2. 3. 4. 5. 6. 7. 8. 9. ve 10. hanelerin toplamından elde edilen sonucun 10'a bölümünden kalan, yani Mod10'u bize 11. haneyi verir. | |
Kurallar http://www.kodaman.org/yazi/t-c-kimlik-no-algoritmasi adresinden alınmıştır. |
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
/** | |
* Load disqus comments when visitor scroll down page to comments | |
* | |
* Usage: | |
* Add a div with id "disqus_thread" and data attributes for every disqus parameter: | |
* | |
* <div id="disqus_thread" data-disqus-shortname="username" data-disqus-url="http://example.com/post/post-name/"></div> | |
* | |
* @author: Murat Corlu | |
* @link: https://gist.github.com/gists/2290198 |
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
SearchQuerySet().filter(user__iexact="murat").filter(content__startswith=request.GET.get('q'))[:10] |
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
$('#header li a.clickable').click(function); |
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
/** | |
* Metni url'de kullanılabilir hale çevirir. Boşluklar tireye çevrilir, | |
* alfanumerik olmayan katakterler silinir. | |
* | |
* Transform text into a URL path slug(with Turkish support). | |
* Spaces turned into dashes, remove non alnum | |
* | |
* @param string text | |
*/ | |
slugify = function(text) { |
OlderNewer