I hereby claim:
- I am meadsteve on github.
- I am meadsteve (https://keybase.io/meadsteve) on keybase.
- I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }
To claim this, I am signing this object:
<? | |
class Api { | |
const SUCCESS = 0; | |
const FAILURE = 13; | |
public function doThingOne($SomeArgument) | |
{ | |
// do something | |
return self::SUCCESS; | |
} |
<?php | |
function intToString($int) { | |
$first = 'second'; | |
$second = 'third'; | |
$third = 'forth'; | |
$forth = 'fifth'; | |
$dollarer = function ($count) { return ($count > 1) ? str_repeat('$', min($count - 1, 4)) : str_repeat('$', 5); }; |
<?php | |
class ControlFlowception extends \Exception {} | |
class Breakception extends ControlFlowception {} | |
class Countception extends ControlFlowception | |
{ | |
protected $count; | |
protected $max; |
<?php | |
$stevesSecret = "pass123"; | |
$hashOne = password_hash($stevesSecret, PASSWORD_BCRYPT, array("cost" => 4)); | |
$hashTwo = password_hash($stevesSecret, PASSWORD_BCRYPT, array("cost" => 12)); | |
echo $hashOne . PHP_EOL; | |
echo $hashTwo . PHP_EOL; | |
assert('$hashOne != $hashTwo', "The two hashes should be different"); |
<?php | |
namespace MeadSteve\Eventing; | |
require_once "vendor/autoload.php"; | |
use Symfony\Component\EventDispatcher\EventDispatcher as SymfonyEventDispatcher; | |
use Symfony\Component\EventDispatcher\EventDispatcherInterface; | |
use \Symfony\Component\EventDispatcher\Event; |
I hereby claim:
To claim this, I am signing this object:
type_with_secrets = (function() { | |
var secret_type_number = 0; | |
var exported_type = function(){}; | |
exported_type.prototype.increment_secret = function() { secret_type_number += 1;}; | |
exported_type.prototype.get_secret = function() { return secret_type_number;}; | |
return exported_type; | |
})(); | |
var aa = "first assignment"; | |
aa = "second assignment"; | |
console.log(aa == aa); |
#!/usr/bin/env elixir | |
defmodule Committer do | |
defstruct [:name, :email] | |
def list(repo) do | |
repo | |
|> from_repo | |
|> Stream.unfold(fn str -> | |
case String.split(str, "\n", parts: 2, trim: true) do |
# This module represents a behaviour and when used picks from the Application configuration which implementation will be used | |
defmodule Clock do | |
@callback now() :: Integer.t | |
defmacro __using__([]) do | |
module = Application.get_env(:my_app, :Clock) | |
quote do | |
alias unquote(module), as: Clock | |
end |