Skip to content

Instantly share code, notes, and snippets.

View marceloandrader's full-sized avatar
🏠
Working from home

Marcelo Andrade R. marceloandrader

🏠
Working from home
View GitHub Profile
@marceloandrader
marceloandrader / .gitconfig
Created October 13, 2011 18:12
misc trips & tricks
[user]
name = Marcelo Andrade
email = marcelo.andrade.r@gmail.com
[core]
editor = mate -w
[alias]
com = commit
co = checkout
st = status
br = branch
#!/bin/bash
# to create migrations files based on time
# parameter should be the name of the migration
# usage:
# ./create_migration.sh add_fields_to_table
touch `date -u +%Y%m%d%H%M%S_`$1.sql%
<?php
require 'vendor/autoload.php';
$template = [
'keys[]' => new mef\Validation\TypedArray(
new mef\Validation\SanitizationChain(
[
new mef\Validation\DefaultValue('false'),
new mef\Validation\Boolean()
<?php
class DI_Field_Template extends DI_Field implements ArrayAccess
{
protected $template;
protected $fields = [];
protected $defaultTemplate = 'template';
protected $uuid = '_tpl_';
public function __construct(DI_Field $template, $uuid = '_tpl_')
{
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
DIR="$( dirname "$SOURCE" )"
cd $DIR/../www/
php index.php --task=migrator --action=$1
from MySQLdb import connect
conn = connect(user="root", passwd="", host="localhost")
cur = conn.cursor()
cur.execute("show databases;")
dbs_to_update = filter(
lambda db: db in ('ppmd_coordinated'),
[dbname[0] for dbname in cur.fetchall()])
{
"name": "digintent/ppmd-coordinated-care",
"description": "PPMD-IBJI",
"authors": [
{
"name": "Digintent Team",
"email": "everyone@digintent.com"
}
],
"repositories": [
composer install
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- digintent/mefworks 1.0.1 requires php >=5.5.0 -> no matching package found.
- digintent/mefworks 1.0.0 requires php >=5.5.0 -> no matching package found.
- Installation request for digintent/mefworks 1.* -> satisfiable by digintent/mefworks[1.0.0, 1.0.1].
- If patient Admit Length of Stay > Care Plan (Pre-Op Eval) Length of Stay then add to At Risk count, end
- else If today > (actual admit date from admit survey + expected length of stay from the care plan (Pre-op Eval)) then add to At Risk count, end
@marceloandrader
marceloandrader / docker-inspect
Created March 26, 2014 15:30
docker inspect
[{
"id": "05d3b2342a085d924bdf2fb72578d56e8ba43f1a7ea9bbafdd4b22923c58a4eb",
"parent": "7e32972eaaefab0f5d617a22b4896352bb2e61cf4ef425be2f502a688110232c",
"created": "2013-06-09T07:11:43.251159959Z",
"container": "75f01691656358e72608c63ef0ae13f7e2c1f5451701dc2a8e6307f12cc99ef4",
"container_config": {
"Hostname": "4781390780b2",
"Domainname": "",
"User": "",
"Memory": 0,