Skip to content

Instantly share code, notes, and snippets.

View arnold-almeida's full-sized avatar
💀
Based

Arnold A arnold-almeida

💀
Based
View GitHub Profile

Keybase proof

I hereby claim:

  • I am arnold-almeida on github.
  • I am aalmeida (https://keybase.io/aalmeida) on keybase.
  • I have a public key ASDtqaRF9zz0GawIP3rSnDJB493UjheQ1ZDjNlpT9zd3OAo

To claim this, I am signing this object:

@arnold-almeida
arnold-almeida / reset.js
Last active August 29, 2015 14:17
knex migrate:reset for pg
'use strict';
var chalk = require('chalk');
/**
* @todo - Display error message when there are no tables to drop
* @todo - Get the migrations to display on CLI like when you run
*
* knex migrate:latest
*
<?php
class UsersController {
public function __construct(FeedbackService $feedback)
{
$this->Feedback = $feedback;
}
public function createUser(CreateUserValidator $validator, User $user)
@arnold-almeida
arnold-almeida / scss.project
Last active January 1, 2017 13:36
A suggestion on how to organise your scss prohect
// link : https://medium.com/p/24cfae349724
// version : 1.0.0
scss/
|
|— site/ # website namespace
|  |— modules/
| |— common/
| |— _footer.scss
@arnold-almeida
arnold-almeida / FixtureShell.php
Created July 31, 2013 06:25
Shortcut shell for quick fixtures
<?php
/**
* Shortcut shell for easy fixtures
*
* Plugin/s :
* git submodule add [email protected]:FloatingPoints/Resources.git app/Plugin/Resources
* Install this file:
* app/Console/Command
* Usage:
* cake fixture [subcommand] [-h] [-v] [-q]
@arnold-almeida
arnold-almeida / MigrateShell.php
Created July 31, 2013 06:14
Shortcut shell to the CakeDC Migrations plugin
<?php
/**
* Shortcut shell to the CakeDC Migrations plugin
* Plugin :
* git submodule add https://github.com/CakeDC/migrations.git app/Plugin/Migrations
* Install this file:
* app/Console/Command
* Usage:
* cake migrate [subcommand] [-h] [-v] [-q]
*
@arnold-almeida
arnold-almeida / SimpleWorkflow.md
Last active December 19, 2015 23:28
Sync only new/changed files from a current dir over ssh to a remote folder.
  • New deployment

rsync -azv --stats --progress . -e ssh user@host:/path/to/vhost/ --exclude=".git" --exclude-from=".gitignore"

  • Notice bad code, locally revert changes, or fix and commit.

git reset --hard HEAD@SHA1

  • Sync working copy again
@arnold-almeida
arnold-almeida / FeatureContext.php
Last active December 17, 2015 22:29
Boilerplate for Behat with Mink on Php 5.4+ with contexts and subcontexts
<?php
/**
* Reading :
*
* - http://www.craftitonline.com/2011/08/behat-symfony-2-secret-how-to-subcontext-minkcontext/
* - http://www.craftitonline.com/2011/07/behat-mink-new-use-of-aliased-subcontexts-complex-step-chaining/
* - http://davidwinter.me/articles/2012/01/14/testing-javascript-websites-with-behat/
* - http://davidwinter.me/articles/2012/01/13/using-behat-with-mink/
*/
use Behat\Behat\Context\ClosuredContextInterface,
@arnold-almeida
arnold-almeida / Check large objects in GIT repo
Created November 24, 2010 04:38
GIT : Check large objects in repo
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output