Skip to content

Instantly share code, notes, and snippets.

View ralbear's full-sized avatar

Ricardo Albear ralbear

View GitHub Profile
@justinatack
justinatack / Quasar Framework Login Form Card Component Example
Last active November 2, 2023 22:22
Quasar Framework Login Form Card Component Example
<template>
<q-page class="bg-light-green window-height window-width row justify-center items-center">
<div class="column">
<div class="row">
<h5 class="text-h5 text-white q-my-md">Company & Co</h5>
</div>
<div class="row">
<q-card square bordered class="q-pa-lg shadow-1">
<q-card-section>
<q-form class="q-gutter-md">
@m8r1x
m8r1x / .gitlab-ci.yml
Created December 11, 2017 20:01 — forked from abdullah353/.gitlab-ci.yml
Basic skeleton of Gitlab CI integration with AWS Lambda for auto deployments.
image: docker:latest
before_script:
- apt-get update -y # Updating the Ubuntu Docker instance.
- python -V # Print out python version for debugging.
- apt install -y zip jq
- pip install awscli --upgrade --user
- export PATH=~/.local/bin:$PATH # Required for awscli.
- aws --version # Print out aws cli version for debugging.
@aboutte
aboutte / Vagrantfile
Created August 23, 2016 14:55
Vagrantfile to set some time synchronization configs
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |virtualbox|
# set timesync parameters to keep the clocks better in sync
# sync time every 10 seconds
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-interval", 10000 ]
# adjustments if drift > 100 ms
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-min-adjust", 100 ]
# sync time on restore
virtualbox.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", 1 ]
# sync time on start
@josecelano
josecelano / validation-in-ddd.php
Created March 31, 2015 14:45
Validation in DDD
<?php
class PaymentController
{
public function makePayment()
{
// POST data:
// fromCustomerId
// toCustomerId
// amount
@mnapoli
mnapoli / reference.yml
Last active January 12, 2023 00:08
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
@victorbstan
victorbstan / php_object_to_array.php
Created December 17, 2010 04:18
recursively cast a PHP object to array
<?php
/*
This function saved my life.
found on: http://www.sitepoint.com/forums//showthread.php?t=438748
by: crvandyke
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?!
*/
$array = json_decode(json_encode($object), true);