Skip to content

Instantly share code, notes, and snippets.

View mbadolato's full-sized avatar
🤘

Mark Badolato mbadolato

🤘
  • Cybernox Technologies
  • Phoenix
View GitHub Profile
<?php
/**
* This is the clock interface. It's really simple, you write it once, use it anywhere.
* Cool extra things you can do:
* - have it return custom value objects
* - separate method for currentDate() without time part
*/
interface Clock
{
@dgreenway
dgreenway / gist:87e329213ce410e38589
Created October 7, 2015 03:19 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@peterjmit
peterjmit / job.md
Last active January 6, 2021 18:04
Developer @ Apple

Apple Inc | Cupertino, CA

Apple is looking for a web and/or ops focused developer to build and maintain cutting edge web based applications that are used throughout the corporation. You should have a passion for technology and continuous learning/improvement.

We run Symfony2/PHP 5.6/Ember.js apps, write tests (BDD) and deploy to production daily. Our infrastructure is managed with Chef.

If you are interested or have any questions please get in touch! pete_mitchell [at] apple [dot] com

@jtgrimes
jtgrimes / speaking.md
Last active June 18, 2017 20:41
Speaking resources

I've been storing articles about speaking and giving talks in Pocket for a while. Most of the articles I haven't read (or have only skimmed) and I make no promises about their quality. They are presented in no particular order. I'm just sharing it in case anyone is interested.

Have other interesting articles? Let me know. Corrections welcome too.

Beth Tucker Long: (@e3betht)

Emma Jane Hogbin Westby (@emmajanehw)

class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@sampart
sampart / pre-commit-csfixer
Created May 18, 2015 14:27
git pre-commit hook to run the Coding Standards fixer against changed files
#!/bin/bash
# Coding Standards fixer from http://cs.sensiolabs.org/ pre-commit hook for git
#
# Based on https://github.com/s0enke/git-hooks
#
# @author Soenke Ruempler <[email protected]>
# @author Sebastian Kaspari <[email protected]>
#
# see the README
@bluescreen
bluescreen / BroadwayProjectionRebuilder.php
Created September 23, 2014 19:01
Broadway Projection Rebuild
<?php
/**
* Projection Rebuilder
* @author Markus Muschol <[email protected]>
*/
use Broadway\Domain\DateTime;
use Broadway\Domain\DomainEventStream;
use Broadway\Domain\DomainMessage;
use Broadway\Domain\Metadata;
use Broadway\EventHandling\EventBusInterface;
@mrkrstphr
mrkrstphr / README.md
Last active February 5, 2019 13:17
Deploying Sculpin Sites to GitHub Pages

Deploying Sculpin Sites to GitHub Pages

I wanted to be able to use Sculpin to generate GitHub pages. Here's what I did...

  1. Created a super awesome Sculpin site from the Sculpin Blog Skeleton

  2. Make sure everything is under version control in my master branch (except things that shouldn't be. see the .gitignore)

  3. Updated publish.sh:

#!/bin/bash

@magnetikonline
magnetikonline / README.md
Last active December 14, 2023 06:45
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active August 30, 2024 08:37
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying