I hereby claim:
- I am c4rl on github.
- I am c4rl (https://keybase.io/c4rl) on keybase.
- I have a public key whose fingerprint is 71C9 F6AD 96D4 B203 014A 8574 67EA 2384 6CC2 4F46
To claim this, I am signing this object:
<?php | |
define('ALPHA', 'abcdefghijklmnopqrstuvwxyz'); | |
$pow = $sum = 0; | |
foreach (array_reverse(str_split(trim(file_get_contents('php://stdin', 'r')))) as $char) { | |
$sum += pow(strlen(ALPHA), $pow++) * (strpos(ALPHA, strtolower($char)) + 1); | |
} |
<?php | |
function _dd($var) { | |
file_put_contents('/tmp/drupal_debug.txt', print_r($var, 1) . PHP_EOL , FILE_APPEND); | |
} |
I hereby claim:
To claim this, I am signing this object:
s = 0 | |
1000.times {|i| s += i % 3 == 0 || i % 5 == 0 ? i : 0 } | |
puts s |
s = 0 | |
# First two Fibbonacci terms | |
f_last = 1 | |
f = 1 | |
while f < 4 * 10**6 | |
# Sum evens | |
s += f % 2 == 0 ? f : 0 |
START | |
id keyword | |
-------------- | |
123 acid and base | |
456 acid and bases | |
567 acids and bases | |
890 koalas | |
END |
results = | |
{ | |
'123' => [ | |
1, | |
2, | |
3 | |
], | |
'234' => [ | |
1, | |
2 |
window['optimizely'].data.experiments.keys().forEach(function(key){ | |
window['optimizely'].push(["activate", key]); | |
}); |
/** | |
* Reverts feature by name. Apparently it's not a thing. Let's make it a thing. | |
* | |
* @param string $name | |
* Machine name of the feature to revert. | |
*/ | |
function _foobar_revert_feature($name) { | |
$feature = features_load_feature($name, TRUE); | |
$components = array(); | |
foreach (array_keys($feature->info['features']) as $component) { |
<?php | |
class Employee { | |
private $type; | |
const BASE_SALARY = 500; | |
function __construct(EmployeeType $type) { | |
$this->type = $type; |