Skip to content

Instantly share code, notes, and snippets.

View gist:a7d213198509c6362ea2
def after_test_step(test_step, result)
blink1 = Blink1.new
blink1.open
if result.passed?
`say -v Kathy "You're Awesome"`
blink1.set_rgb(34, 27, 230)
elsif result.failed?
`echo 'Test Failed' | terminal-notifier -sound default`
`say "You suck"`
blink1.set_rgb(222, 38, 35)
View gist:29e44f9b42fbb75e7cfe
# Personal Scheduler
This is so atendees can worry less about boring stuff and more about socialising.
## Choosing a Talk
### Tracks
+ IT has specified numbered tracks
View gist:9060972
<?php
namespace Mackstar\Spout\Admin\Resource\App\Users;
use BEAR\Resource\ResourceObject;
use BEAR\Package\Module\Database\Dbal\Setter\DbSetterTrait;
use BEAR\Sunday\Annotation\Db;
use Mackstar\Spout\Interfaces\SecurityInterface;
use Mackstar\Spout\Admin\Annotation\Form;
use Ray\Di\Di\Inject;
@mackstar
mackstar / gist:9060957
Last active Aug 29, 2015
Angular Setup
View gist:9060957
'use strict';
var app = angular.module('spout', ['ngRoute', 'restangular', 'ngAnimate', 'ui.bootstrap']);
/* Utility service to apply form errors to a form */
app.service('parseFormErrors', function() {
return function (data, form) {
for(property in data.errors) {
form[property].$dirty = true;
form[property].$invalid = true;
View User Add Markup
<img src="/img/spinner.gif" width="64" height="64" ng-show="!ready()" id="spinner" />
<div ng-show="ready()" class="row">
<ul class="nav nav-tabs">
<li class="active link" ng-click="submit()"><span class="glyphicon glyphicon-ok"></span></li>
<li class="cancel link" ng-click="close()"><span class="glyphicon glyphicon-remove"></span></li>
</ul>
<form name="userForm" novalidate>
View User Controller
'use strict';
app.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/add', {
templateUrl: '/js/templates/users/edit.html',
controller: 'UserAddCtrl'
});
}]);
@mackstar
mackstar / gist:1545478
Created Dec 31, 2011
Error for iphone Titanium build
View gist:1545478
================================================================================
Appcelerator Titanium Diagnostics Build Log
The contents of this file are useful to send to Appcelerator Support if
reporting an issue to help us understand your environment, build settings
and aid in debugging. Please attach this log to any issue that you report.
================================================================================
Starting build at 12/31/11 21:32
Build details:
View gist:1291870
public function testUpdateWithSubObjects() {
$model = $this->_model;
$exists = true;
$model::config(array('key' => '_id'));
$model::schema(array(
'array' => array('type' => 'string', 'array' => true),
'dictionary' => array('type' => 'string', 'array' => true),
'forceArray' => array('type' => 'string', 'array' => true)
));
View Env
Environment::is(function($request) {
$isLocal = $request->env('HTTP_HOST') == 'lithium.local';
if(preg_match('/^\/test/', $request->env('REQUEST_URI')) && $isLocal) {
return 'test';
}
if($isLocal) {
return 'development';
}
});
View remote_mysql_retrieval.sh
#!/bin/bash
REMOTEUSER=username
REMOTEPASS=password
REMOTECOMPUTER=remotecomputer.com
REMOTEMYSQLUSER=mysqllogin
REMOTEMYSQLPASS=mysqlpass
DB=database
FILENAME=dbschema.sql
LOCALMYSQLUSER=localuser
LOCALMYSQLPASS=localpassword
You can’t perform that action at this time.