Skip to content

Instantly share code, notes, and snippets.

View revagomes's full-sized avatar
🦉

Reva Gomes revagomes

🦉
View GitHub Profile
@revagomes
revagomes / docker-prune.sh
Created October 21, 2022 21:03 — forked from haeramkeem/docker-prune.sh
how to resolve 'ERROR: readlink /var/lib/docker/overlay2: invalid argument'
#!/bin/bash
# Dealing with error: 'ERROR: readlink /var/lib/docker/overlay2: invalid argument'
# In kubernetes or docker
# Have to clear the docker cache
# docker prune will tidy the unused container, images, cache, etc.
docker system prune --all
docker volume prune
@revagomes
revagomes / FeatureContext.php
Created May 22, 2022 17:22 — forked from jhedstrom/FeatureContext.php
Behat Selenium driver screenshot
<?php
/**
* @AfterStep
*/
public function takeScreenShotAfterFailedStep(AfterStepScope $scope) {
if (99 === $scope->getTestResult()->getResultCode()) {
$driver = $this->getSession()->getDriver();
if (!($driver instanceof Selenium2Driver)) {
return;
@revagomes
revagomes / FeatureContext.php
Created May 22, 2022 17:22 — forked from jhedstrom/FeatureContext.php
Organic Groups Behat step-definition examples
<?php
/**
* @Given /^I am logged in as a user in the "(?P<group>[^"]*)" group$/
*/
public function iAmLoggedInAsAUserInTheGroup($group) {
// Create user.
$account = (object) array(
'pass' => $this->getDrupal()->random->name(),
'name' => $this->getDrupal()->random->name(),
);
@revagomes
revagomes / list.md
Last active July 30, 2021 22:40 — forked from notwaldorf/list.md
Revagomes' packing list

Revagomes' packing list

I travel a lot so I'm down to like 30 minutes of packing per any kind of trip. I always bring one carry-on suitcase for any trips up to 2 weeks (that I never check in unless forced) -- I have an Away suitcase because it's got a built-in (removable) battery, and amazing wheels.

🚨

  • 🆔Wallet & Passport
  • 💧Travel water bottle
  • 💳Travel credit cards (don't pay foreign currency fees!)
  • 💳Insurance cards
  • 💵Local currency you have
  • 🚎Local public transport cards
@revagomes
revagomes / logslaravel.sh
Created August 27, 2018 23:09 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@revagomes
revagomes / dockersetup.MD
Created August 5, 2016 02:54 — forked from diniremix/dockersetup.MD
setup docker on elementary OS freya

instalar docker

instalar una imagen (ubuntu 14.04 en este caso)

  • sudo docker run ubuntu:14.04

revisar las imagenes instaladas

  • sudo docker images

entrar en la imagen recien creada

@revagomes
revagomes / MYSQL_Cheatsheet.md
Last active February 22, 2016 16:47 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@revagomes
revagomes / addvhost
Last active August 29, 2015 14:11 — forked from marioheber/addvhost
#!/bin/bash
# This script creates virtual hosts.
# You should put export PATH="path to this file" in .bashrc
# and run it with sudo addvhost
# Default path
www=/var/www

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path: