Skip to content

Instantly share code, notes, and snippets.

<div class="social">
<span class="twitter">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="[your-url-here]">Tweet</a>
</span>
<span class="google">
<g:plusone size="medium" href="[your-url-here]"></g:plusone>
</span>
<span class="Facebook">
<iframe src="https://www.facebook.com/plugins/like.php?href=[your-url-here]&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 100px" allowTransparency="true"></iframe>
</span>
@turhn
turhn / faprepender.css
Created August 24, 2014 21:22
Prepend FontAwesome In Placeholder
input.date-picker::-webkit-input-placeholder::before { font-family: fontAwesome; content: '\f073 '; color: inherit }
input.date-picker::-moz-placeholder::before { font-family: fontAwesome; content:'\f073'; color: inherit } /* firefox 19+ */
input.date-picker:-ms-input-placeholder::before { font-family: fontAwesome; content:'\f073'; color: inherit } /* ie */
input.date-picker:-moz-placeholder::before { font-family: fontAwesome; content:'\f073'; color: inherit }
@turhn
turhn / daterange_filter.js
Created August 19, 2014 16:02
Date range filter for Angular.JS
app.filter('daterange', function() {
return function(items, startDate, endDate) {
var filteredResult = [];
// Parse from the filter format 'dd/mm/yyyy' (Turkish culture)
function parseDateFromFilter(strDate) {
var parts = strDate.split('/');
return new Date(parts[2], parts[1] - 1, parts[0]);
}
@turhn
turhn / snippets.cson
Created August 14, 2014 19:01
Atom.IO Editor - Jekyll Language Highlighter Snippet for GitHub Markup (.md)
#usage : hi<tab>
'.source.gfm':
'Highlight Markup':
'prefix': 'hi'
'body': '{% highlight $1 %}\n{% endhighlight %}'
@turhn
turhn / tckn_verifier.rb
Last active August 29, 2015 14:05
TCKN Verifier - Turkish Citizenship Number Checker - TCKN Kimlik No Doğrulama
###
# Author : Turhan Coskun
# Name : TCKN Number Verification - TCKN Dogrulama
# Usage : ruby tckn_verifier.rb <turkish citizenship number>
###
raw_id_number = ARGV[0] # Assign the first argument of the program to the variable
# Extensions of the String class
class String