Skip to content

Instantly share code, notes, and snippets.

View gmansilla's full-sized avatar

Guillermo Mansilla gmansilla

  • Amazon Web Services (AWS)
  • Orlando, Florida. USA
  • LinkedIn in/gmansilla
View GitHub Profile
@gmansilla
gmansilla / RDS-Aurora-CloudFormation-Example.yaml
Created September 9, 2020 13:29 — forked from sjparkinson/RDS-Aurora-CloudFormation-Example.yaml
A basic CloudFormation template for an RDS Aurora cluster.
---
AWSTemplateFormatVersion: 2010-09-09
Description: >
A basic CloudFormation template for an RDS Aurora cluster.
Parameters:
DatabaseUsername:
AllowedPattern: "[a-zA-Z0-9]+"
ConstraintDescription: must be between 1 to 16 alphanumeric characters.
@gmansilla
gmansilla / animals.php
Created September 11, 2017 21:09
Farm Animals version2
<?php
namespace App;
/**
* Interface iGenericUtilities to be implemented by any Concrete Utility Class
* @package App
*/
interface iGenericUtilities {
public function saveToFile($filename, $data);
@gmansilla
gmansilla / animals.php
Created September 11, 2017 16:58
Animal test
<?php
namespace App;
/**
* Base Class Animal
* @package App
*/
class Animal
{
object(Symfony\Component\Debug\Exception\FlattenException)#87 (10) {
["message":"Symfony\Component\Debug\Exception\FlattenException":private]=>
string(35) "No route found for "POST /product/""
["code":"Symfony\Component\Debug\Exception\FlattenException":private]=>
int(0)
["previous":"Symfony\Component\Debug\Exception\FlattenException":private]=>
object(Symfony\Component\Debug\Exception\FlattenException)#85 (10) {
["message":"Symfony\Component\Debug\Exception\FlattenException":private]=>
string(0) ""
["code":"Symfony\Component\Debug\Exception\FlattenException":private]=>
@gmansilla
gmansilla / forecast.php
Last active October 27, 2015 21:02
forecast
<?php
// implementers are responsible for doing the necessary math, store the data in whatever structure it requires
interface IForecaster
{
public function fetchForecastResult();
}
// only encapsulates the result of a forecast, DOES NOT DO ANY CALCULATIONS OR LOGIC
interface IForecastResult
import __main__
#__main__.__requires__ = ['ReviewBoard']
import pkg_resources
import os
import sys
import site
site.addsitedir('/usr/lib/python2.6/site-packages')
import os
import sys
import site
site.addsitedir('/usr/local/reviewboard/reviewboard_env/lib/python2.6/site-packa
ges')
activate_env=os.path.expanduser("/usr/local/reviewboard/reviewboard_env/bin/acti
vate_this.py")
execfile(activate_env, dict(__file__=activate_env))
import __main__
__main__.__requires__ = ['ReviewBoard']
import pkg_resources
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = "reviewboard.settings"
os.environ['PYTHON_EGG_CACHE'] = "/var/www/reviewboard/tmp/egg_cache"
os.environ['HOME'] = "/var/www/reviewboard/data"
public boolean authenticate( String name, String voterId ) {
Voter voter = getVoter( name );
if ( voter == null ) {
return false;
}
if ( voter.getVoterId().equals(voterId)) {
return true;
}
return false;
}