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
ROOT="/Applications/Sublime Text 2.app/Contents/Resources" | |
TEMP=$(/usr/bin/env mktemp -d '/tmp/Sublime-Text-2-Icon.XXXXXX') | |
git clone git://github.com/dmatarazzo/Sublime-Text-2-Icon.git $TEMP | |
cp "$ROOT/Sublime Text 2.icns" "$ROOT/Sublime Text 2.icns.old" | |
cp "$TEMP/Sublime Text 2.icns" "$ROOT/Sublime Text 2.icns" | |
rm -rf $TEMP |
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
{ | |
"_links": { | |
"self": { | |
"href": "/scrobbles/phuedx/1311137514" | |
} | |
}, | |
"_embedded": { | |
"track": { | |
"_links": { | |
"self": { |
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
<?php | |
class CallMeMaybe | |
{ | |
public function __call($name, $arguments) | |
{ | |
$class = new ReflectionClass($this); | |
$weightedMethods = array(); | |
foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { | |
$methodName = $method->getName(); |
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
<?php | |
require __DIR__ . '/wmgUseGettingStarted.php'; // Modified to initialise $wmgUseGettingStarted | |
function getSitelinksByID( $id ) { | |
$url = "https://www.wikidata.org/w/api.php?format=json&action=wbgetentities&props=sitelinks&ids={$id}"; | |
$responseBodyRaw = file_get_contents( $url ); | |
$responseBody = json_decode( $responseBodyRaw, true ); | |
$entity = $responseBody[ 'entities' ][ $id ]; | |
$result = array(); |
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
.fade-in-keyframes-for-direction(@direction, @dx, @dy) { | |
@-webkit-keyframes mwe-gt-fade-in-@{direction} { | |
.mwe-gt-fade-in-translate-frames(@dx, @dy); | |
} | |
@-moz-keyframes mwe-gt-fade-in-@{direction} { | |
.mwe-gt-fade-in-translate-frames(@dx, @dy); | |
} | |
@-o-keyframes mwe-gt-fade-in-@{direction} { |
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
<?php | |
function is_instance_of( $item ) { | |
return "CLAIM[31:{$item}]"; | |
} | |
function is_instance_of_band() { | |
return is_instance_of( '215380' ); | |
} |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
Listens to a wiki's recentchanges feed and publishes them as standardised JSON | |
events, converted to strings, via a ØMQ PUB socket. | |
Usage: | |
./firehose.py <api_url> <endpoint> | |
Options: |
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
<?hh | |
type F1<Ta, Tb> = (function(Ta): Tb); | |
class Identity<Ta> { | |
public function __construct(private Ta $value) {} | |
public function bind<Tb>(F1<Ta, Identity<Tb>> $f): Identity<Tb> { | |
return $f($this->value); | |
} |
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
// This Source Code Form is subject to the terms of the Mozilla Public | |
// License, v. 2.0. If a copy of the MPL was not distributed with this | |
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
// ===BEGIN ICANN DOMAINS=== | |
// ac : http://en.wikipedia.org/wiki/.ac | |
ac | |
com.ac | |
edu.ac |
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
Experiment: version | |
Scenario: | |
Given the user is logged in | |
Then they should have a 70% chance of being "A" | |
And they should have a 30% chance of being "B" |
OlderNewer