Skip to content

Instantly share code, notes, and snippets.

View Cayan's full-sized avatar

Daniel Pinto Cayan

  • Brazil, Rio de Janeiro
View GitHub Profile
@Cayan
Cayan / debugger.sh
Created April 13, 2022 12:57
Executes a program multiple times and reports on exit codes
#!/bin/bash
TOTAL=100
printf "Starting the script\n"
for i in `seq 1 $TOTAL`; do
trap 'printf "\nExited!"; break;' SIGINT SIGTERM
printf '\r%i / %i' $i $TOTAL
$@ >> debugger.log 2>&1
@Cayan
Cayan / ecs-delete-task-definition.sh
Created June 27, 2018 13:20
Script to delete all ECS task definitions according to a pattern
# run `aws ecs list-task-definitions --status active` to list all available task definitions
aws ecs list-task-definitions --status active | grep REPLACE_WITH_THE_NAME_OF_DEFINITION |
awk '{print substr($0, 1, length($0)-1)}' | xargs -I{} aws ecs deregister-task-definition --task-definition {}
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: changes: 0
JS: === dump(): dumping members ===
JS: {
JS: "item": {
JS: "currentValue": {
JS: "id": 1,
JS: "name": "Ter Stegen",
JS: "role": "Goalkeeper"
JS: },
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: changes: 0
JS: === dump(): dumping members ===
JS: {
JS: "item": {
JS: "currentValue": {
JS: "id": 1,
JS: "name": "Ter Stegen",
JS: "role": "Goalkeeper"
JS: },
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: changes: 0
JS: === dump(): dumping members ===
JS: {
JS: "item": {
JS: "currentValue": {
JS: "id": 1,
JS: "name": "Ter Stegen",
JS: "role": "Goalkeeper"
JS: },
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: changes: 0
JS: === dump(): dumping members ===
JS: {
JS: "item": {
JS: "currentValue": {
JS: "id": 1,
JS: "name": "Ter Stegen",
JS: "role": "Goalkeeper"
JS: },
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
<?php
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class UserCRUDFailureTest extends TestCase
{
use DatabaseMigrations, DatabaseTransactions;
protected $prefix = '';
<?php
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class UserCRUDTest extends TestCase
{
use DatabaseMigrations, DatabaseTransactions;
protected $prefix = '';
@Cayan
Cayan / pre-commit
Last active September 30, 2021 02:56 — forked from chelmertz/pre-commit
pre-commit hook for git, running php lint, phpcs and phpmd
#!/usr/bin/php
<?php
// copied from https://gist.github.com/chelmertz/816166
// authored by Travis Swicegood
// modified by Daniel Pinto and Israel Trindade
class Enable
{
const PHP_LINT = true;