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
<?php | |
function get_guid_from_oauth($provider, $token) { | |
global $CONFIG; | |
$identifier = strtolower($provider); | |
foreach (array("LinkedIn", "MySpace", "AOL") as $prov) { | |
$identifier = str_replace(strtolower($prov), $prov, $identifier); | |
} | |
$identifier = ucfirst($identifier) . "_" . $token; | |
$query = "SELECT entity_guid from {$CONFIG->dbprefix}private_settings where name = 'plugin:user_setting:elgg_social_login:uid' and value = '{$identifier}'"; |
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
require 'nokogiri' | |
require 'open-uri' | |
MARK_FILE = "mark.dat" | |
def wait_for_threads(threads) | |
print "Waiting for downloads to finish..." | |
threads.each { |t| t.join } | |
puts " ok" | |
end |
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
# calculates BW(T) | |
def bw(t): | |
m = sorted(t[-i:] + t[:-i] for i in range(len(t))) | |
return "".join(m[i][len(t)-1] for i in range(len(t))) | |
# for a given string return index with nth occurence of char | |
def n_occurence_index(string, char, n): | |
vector = [string[:index+1].count(char) for index in range(0, len(string))] | |
return vector.index(n) |
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
"si": | |
date: | |
formats: | |
default: "%d. %m. %Y." | |
short: "%e %b" | |
long: "%B %e, %Y" | |
only_day: "%e" | |
day_names: [Nedelja, Ponedeljek, Torek, Sreda, Četrtek, Petek, Sobota] | |
abbr_day_names: [Ned, Pon, Tor, Sre, Čet, Pet, Sob] |
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
Xcode | |
http://developer.apple.com/technology/xcode.html | |
[OR] | |
Mac OS X install disc 2 | |
GNU wget | |
http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz | |
Git | |
http://code.google.com/p/git-osx-installer/ |
NewerOlder