This file contains 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 turkishUpperCase(s) { | |
s = s.replace(/ı/g, 'I'); | |
s = s.replace(/i/g, 'İ'); | |
return s.toUpperCase(); | |
} | |
function fixSmallCaps(selector) { | |
$$(selector).each(function(e) { | |
var text = e.innerHTML; | |
var upper = turkishUpperCase(text); |
This file contains 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
def yaziyla(amount) | |
r = '' | |
if amount >= 2000 | |
r += yaziyla_part(amount / 1000) + 'BİN' | |
elsif amount >= 1000 | |
r += 'BİN' | |
end | |
r += yaziyla_part(amount % 1000) + ' TL' | |
kurus = (amount * 100) % 100 |
This file contains 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
def age | |
age = Date.today.year - self.birthday.year | |
if Date.today < self.birthday.advance(:years => age) | |
age -= 1 | |
end | |
return age | |
end |
This file contains 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
def random_password(len) | |
chars = ("a".."z").to_a + ("0".."9").to_a | |
result = "" | |
1.upto(len) { |i| result << chars[rand(chars.size-1)] } | |
return result | |
end |
This file contains 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 sys | |
import json | |
import base64 | |
import urllib2 | |
liveURL = 'https://buy.itunes.apple.com/verifyReceipt' | |
sandboxURL = 'https://sandbox.itunes.apple.com/verifyReceipt' |
This file contains 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
/* | |
* 960gs ExtendScript for Adobe Photoshop CS5 | |
* Copyright (c) 2010 Can Berk Güder | |
*/ | |
#target photoshop | |
var doc; | |
var w = new Window( | |
"dialog {\ |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
float randomf() { | |
return (float)random() / (float)RAND_MAX; | |
} | |
float weibull(float alpha, float beta) { | |
float u = 1.0 - randomf(); |
This file contains 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
system.method.set_key = event.download.finished,notify_finished,"execute=rtorrentNotify,--finished,$d.get_name=" | |
system.method.set_key = event.download.inserted_new,notify_inserted_new,"execute=rtorrentNotify,--inserted-new,$d.get_name=" |
This file contains 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
javascript:window.location=$("#left-stack img.artwork").attr("src").replace("170x170", "1200x1200") |
This file contains 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
PROJECT_NAME = "AwesomeThing" | |
APP_NAME = "AwesomeThing" | |
@configuration = "Debug" | |
@app_suffix = "-Dev" | |
@staging_developer_name = "iPhone Developer: <<FILL ME IN>>" | |
@staging_provisioning_profile = "Support/AwesomeThing.mobileprovision" | |
@production_developer_name = "iPhone Distribution" | |
@production_provisioning_profile = "Support/AwesomeThing.mobileprovision" | |
@appstore_developer_name = "iPhone Distribution" | |
@appstore_provisioning_profile = "Support/AwesomeThing.mobileprovision" |
OlderNewer