Skip to content

Instantly share code, notes, and snippets.

@clouddueling
clouddueling / README.md
Created May 9, 2014 19:57
AngularJS FileSystem Music Player
  1. Install PHP
  2. Create an index.php in the folder you want to play mp3's from.
  3. In your terminal navigate to that folder and run: php -S localhost:3333
  4. Go to http://codepen.io/clouddueling/full/atwke and your files should load.
<?php
/**
* Create a redirect response.
*
* <code>
* // Create a redirect response to a location within the application
* return Redirect::to('user/profile');
*
* // Create a redirect response with a 301 status code
<?php
class Card_Controller extends Base_Controller
{
public function get_confirm()
{
$s = Api::inputs([
'card_id' => 0,
'contact_id' => 0,
'account_user_id' => 0,
<?php
class Record_Controller extends Base_Controller
{
public function get_print($id)
{
$record = Record::find($id);
has_access($record);
$account = Auth::user()->account();
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
02installVendors:
command: /usr/bin/composer.phar install
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
02installVendors:
command: /usr/bin/composer.phar install --no-dev
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
@clouddueling
clouddueling / composer.yaml
Created May 6, 2014 23:52
ElasticBeanstalk PHP Composer Config
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update &&
02installVendors:
command: /usr/bin/composer.phar install --no-dev
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
<?php namespace Modules\Api;
use Validator;
use User;
use Input;
use Response;
use Sanitize;
class Api
{
⚡ grunt release
Running "clean:0" (clean) task
Cleaning public/dist/js...OK
Running "uglify:vendor" (uglify) task
File public/dist/js/vendor.js created.
Running "uglify:profile" (uglify) task
File public/dist/js/profile.js created.
@clouddueling
clouddueling / ServiceExample.js
Last active August 29, 2015 14:00
A service you can create easily instances of and test.
// NOTE: I ripped this out of my app so it's missing some context. Just observe the methodology used.
// This was also incredibly simple to reach 100% testing across the board.
(function() {
'use strict';
angular.module('module.finder', [])
.controller('ModuleFinderCtrl', ['$scope', 'Finder', function($scope, Finder) {
$scope.finder = new Finder();