Skip to content

Instantly share code, notes, and snippets.

🎩
stuff

Steve B meadsteve

Block or report user

Report or block meadsteve

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@meadsteve
meadsteve / Dockerfile
Last active Apr 2, 2019 — forked from philcross/Dockerfile
docker example
View Dockerfile
#services/php/Dockerfile
FROM php:7.3-fpm
WORKDIR /var/www/html
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV COMPOSER_NO_INTERACTION=1
ENV COMPOSER_HOME=/usr/local/share/composer
View keybase.md

Keybase proof

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 C00A D434 70A0 113C EF31 8E28 6B08 AFC9 C001 CE6F

To claim this, I am signing this object:

View extensionhelper.js
var CheckMessageForKeyword = function(message, keyword, hasParameters) {
if (!message.data || !message.data.text) {
return null;
}
var keywordRegex;
if (hasParameters) {
keywordRegex = new RegExp("^\\s*" + keyword + "\\s*(\\S.+?)\\s*$", "i");
var params = message.data.text.match(keywordRegex);
@meadsteve
meadsteve / clock.ex
Created Sep 30, 2015 — forked from CrowdHailer/clock.ex
Creating boundary modules for elixir applications. These have their implementation set during the configuration step. In this example we switch clock between system clock and a dummy clock
View clock.ex
# 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
@meadsteve
meadsteve / example.php
Last active Aug 26, 2015
Api !== Http
View example.php
<?
class Api {
const SUCCESS = 0;
const FAILURE = 13;
public function doThingOne($SomeArgument)
{
// do something
return self::SUCCESS;
}
View downloader.exs
#!/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
@meadsteve
meadsteve / oops.js
Last active Aug 29, 2015
unicode vs javascipt coder sanity
View oops.js
var a‌a = "first assignment";
aa = "second assignment";
console.log(a‌a == aa);
@meadsteve
meadsteve / example.js
Last active Aug 29, 2015
js-private-type-info
View example.js
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;
})();
View keybase.md

Keybase proof

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:

@meadsteve
meadsteve / experiment.php
Last active Aug 29, 2015
Symfony events without statics
View experiment.php
<?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;
You can’t perform that action at this time.