Skip to content

Instantly share code, notes, and snippets.

@ricog
ricog / 00-deploy-quasar-framework-using-aws-amplify-console.md
Last active May 5, 2024 21:20
Deploy Quasar Framework using AWS Amplify Console
  1. Modify build image settings to use the node:12 image (see screenshot below).
  2. Replace the amplify.yml file in the console with this one.

This will start the build using node:12, install Quasar CLI, run quasar build and speficy dist/spa as the output directory.

image

@ricog
ricog / Dockerfile
Created November 8, 2016 15:54
Docker wait for mysql to be ready and then load sql
FROM mysql:5.6
MAINTAINER Your Name <you@yourplace.com>
COPY wait-for-mysql.sh /
CMD /wait-for-mysql.sh
@ricog
ricog / gist:2022105
Created March 12, 2012 13:59
Include DebugKit on-the-fly when debug >= 3

This gist shows an easy way to include DebugKit as a new debug level in your CakePHP applications. You'll first need to install the DebugKit plugin and then add the following code:

CakePHP >= 2.0

In Config/bootstrap.php

// Load DebugKit only if debug level is greater than 3
if (Configure::read('debug') >= 3) {

CakePlugin::load("DebugKit");

@ricog
ricog / deployment-workflow.md
Last active December 18, 2015 15:58
Deployment workflow

Below is a branching strategy using rebase that maintains a deployable master branch and stable staging branch for quality assurance testing.

###Branch Concepts

  • master - always deployable to production
  • staging - stable code base ready for pre-production testing, also the feature branch merge target
  • features - one branch per feature, testable in development environments, only merged to staging once stable and ready to deploy
  • patches - one branch per patch, urgent items that need applied to master branch ahead of staging and feature branches

Feature branches are agressively rebased on the staging branch by the feature developer. After completed, tested, and signed off (by at least one other developer), the feature branch is merged into staging for final testing. Patch/fix branches are derived from master and rebased if necessary before merging back in.

@ricog
ricog / html5-skeleton
Created April 30, 2012 21:15
HTML5 skeleton
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
</body>
</html>
@ricog
ricog / gist:1684813
Created January 26, 2012 20:13
Vim EOL fix
" http://vim.wikia.com/wiki/VimTip1369
" Preserve noeol (missing trailing eol) when saving file. In order
" to do this we need to temporarily 'set binary' for the duration of
" file writing, and for DOS line endings, add the CRs manually.
" For Mac line endings, also must join everything to one line since it doesn't
" use a LF character anywhere and 'binary' writes everything as if it were Unix.
" This works because 'eol' is set properly no matter what file format is used,
" even if it is only used when 'binary' is set.
@ricog
ricog / gist:1584681
Created January 9, 2012 20:10
Better Git Workflow

This describes a fairly simple git workflow where features are developed on descriptively named branches. These branches are pushed to github and merged into master once completed and tested by someone else. This is very similar to github flow.

Committing Changes

  1. Make some changes

  2. Commit to a new descriptively named branch

@ricog
ricog / basic-git-workflow
Created January 9, 2012 20:01
Basic Git Workflow
## Installation
get the files
git clone <repo url>
## Working on files
see what you've changed
git diff
@ricog
ricog / gist:1348166
Created November 8, 2011 15:56
Split long if statements onto several lines
<?php
if (
$something === true &&
$something_else === false
) {
//code here
}
?>

Keybase proof

I hereby claim:

  • I am ricog on github.
  • I am ricog (https://keybase.io/ricog) on keybase.
  • I have a public key whose fingerprint is D7FA 65DA 4CA0 7552 CA59 4550 0DA3 010B 5ADA 2730

To claim this, I am signing this object: