Skip to content

Instantly share code, notes, and snippets.

View mgirouard's full-sized avatar
🤘

Michael Girouard mgirouard

🤘
View GitHub Profile
@mgirouard
mgirouard / jira-rest-enpoints.md
Created January 11, 2015 19:41
Useful JIRA Rest Endpoints

List all Agile boards

/rest/greenhopper/1.0/rapidview

The full web URL may be constructed by setting the rapidView query paramater to the /secure/RapidBoard.jspa endpoint. For example /secure/RapidBoard.jspa?rapidView=69.

# git project init
# What would you like to use as a branch prefix? [FOO]
# What deployment remotes would you like to define? [test prod stage]
# git project topic
# git project deploy
@mgirouard
mgirouard / QA.md
Last active April 29, 2016 17:55
99 QA Points for Symfony projects, via https://insight.sensiolabs.com/what-we-analyse

Critical Checks

Security

  • Projects must not depend on dependencies with known security issues
  • Database queries should use parameter binding
  • PHP debug statements found
  • eval() should never be used
@mgirouard
mgirouard / generate-cert.sh
Created March 20, 2014 06:36
Self-signed certificate generator: expects $1 to be a hostname
#!/bin/bash
openssl req -new -newkey rsa:2048 -nodes -keyout $1.key -out $1.csr
openssl x509 -req -days 366 -in $1.csr -signkey $1.key -out $1.crt
@mgirouard
mgirouard / excerpt.php
Created January 21, 2014 17:55
A different way of handling excerpts. Inspired by WP.
<?php
function get_excerpt($input, $length = 250)
{
return current(explode("\n", wordwrap($input, $length)));
}
<?php // via http://stackoverflow.com/questions/11657835
$onlyIds = array_map('current', $results);
set_acl_permissions:
@mgirouard
mgirouard / get-latest-wordpress.sh
Created October 29, 2013 14:31
Curl, get me the latest version of wordpress and dump *all* files right here
curl wordpress.org/latest.tar.gz |\
tar -xvz --strip-components=1 --
#!/bin/bash
##
# Run from within a git directory
##
GIT_WORK_TREE=/var/www/example.com/prod git checkout -f
@mgirouard
mgirouard / sym-devify.sh
Last active December 25, 2015 18:09
Symfony Helpers
#!/bin/bash
##
# Devify your Symfony install.
#
# Clears the cache, deploys symlinks of the public assets.
##
php app/console cache:clear &&\
php app/console assets:install --symlink