Skip to content

Instantly share code, notes, and snippets.

View vovimayhem's full-sized avatar
🎸
Taking names and kicking ass

Roberto Quintanilla vovimayhem

🎸
Taking names and kicking ass
View GitHub Profile
@vovimayhem
vovimayhem / dev.Dockerfile
Created August 18, 2017 00:02
PhantomJS on Alpine (Docker)
# 1: Use node 6 as base:
FROM node:6-alpine
# 2: Download+Install PhantomJS, as the npm package 'phantomjs-prebuilt' won't work on alpine!
# See https://github.com/dustinblackman/phantomized
RUN set -ex \
&& apk add --no-cache --virtual .build-deps ca-certificates openssl \
&& wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \
&& npm install -g phantomjs \
&& apk del .build-deps
@vovimayhem
vovimayhem / install.sh
Last active November 20, 2023 22:33
Install on Linux Mint the latest version of JMeter that has the redirects behavior correct (2.9)
# Download the jmeter gzipped tarball to a temporary folder:
wget -O /tmp/jmeter.tgz http://archive.apache.org/dist/jmeter/binaries/apache-jmeter-2.9.tgz
# Extract to /usr/share
sudo tar -xzvf /tmp/jmeter.tgz -C /usr/share
# Edit the provided JMeter start script, changing the string '`dirname "$0"`' for '/usr/share/jmeter/bin':
sudo sed -i 's/`dirname "\$0"`/\/usr\/share\/apache-jmeter-2.9\/bin/g' /usr/share/apache-jmeter-2.9/bin/jmeter
# Generate the following symlinks:
@vovimayhem
vovimayhem / remove-vscode
Last active February 18, 2023 21:15
Completely remove Visual Studio Code on Mac 2023
#! /bin/zsh
sudo rm -rf "/Applications/Visual Studio Code.app"
sudo rm -rf /System/Volumes/Data/usr/local/bin/code
rm -rf ~/Library/Application\ Support/Code
rm -rf ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.vscode.sfl2
rm -rf ~/Library/Caches/com.microsoft.VSCode*
rm -rf ~/Library/HTTPStorages/com.microsoft.VSCode*
rm -rf ~/Library/Preferences/ByHost/com.microsoft.VSCode*
rm -rf ~/Library/Preferences/com.microsoft.VSCode*
@vovimayhem
vovimayhem / Gemfile
Last active January 3, 2022 17:20
Spec mocks failing on ruby 3
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rspec', github: 'rspec/rspec-metagem', ref: 'main'
gem 'rspec-core', github: 'rspec/rspec-core', ref: 'main'
gem 'rspec-expectations', github: 'rspec/rspec-expectations', ref: 'main'
gem 'rspec-mocks', github: 'rspec/rspec-mocks', ref: 'main'
gem 'rspec-support', github: 'rspec/rspec-support', ref: 'main'
@vovimayhem
vovimayhem / airbrake.rb
Created July 15, 2019 20:38
Airbrake Initializer
# Airbrake is an online tool that provides robust exception tracking in your Rails
# applications. In doing so, it allows you to easily review errors, tie an error
# to an individual piece of code, and trace the cause back to recent
# changes. Airbrake enables for easy categorization, searching, and prioritization
# of exceptions so that when errors occur, your team can quickly determine the
# root cause.
#
# Configuration details:
# https://github.com/airbrake/airbrake-ruby#configuration
require 'airbrake/sidekiq'
@vovimayhem
vovimayhem / json-api-infinity.js
Created June 13, 2019 17:15
ember-infinity and jsonapi pagination
import { resolve } from 'rsvp';
import { merge } from '@ember/polyfills';
import { isPresent } from '@ember/utils';
import InfinityModel from 'ember-infinity/lib/infinity-model';
export default InfinityModel.extend({
canLoadMore: true,
buildParams(increment) {
let pageParams = {};
@vovimayhem
vovimayhem / Dockerfile
Last active May 25, 2019 20:00
Ejemplo Dockerfile para app compilada de js
####################################################################################################
# Stage I - The builder stage: We'll use as much as the same commands (layers) on the dev.Dockerfile
# so we can use the cache as much as possible:
# 1: Use node 8 as base:
FROM node:8-alpine as development
# 2: We'll set the application path as the working directory
WORKDIR /usr/src
@vovimayhem
vovimayhem / dev-entrypoint.sh
Last active March 23, 2019 17:18
Development Entrypoint for PHP
#! /bin/sh
# The Docker App Container's development entrypoint.
# This is a script used by the project's Docker development environment to
# setup the app containers and databases upon runnning.
set -e
: ${APP_PATH:="/usr/src"}
: ${APP_TEMP_PATH:="$APP_PATH/tmp"}
: ${APP_SETUP_LOCK:="$APP_TEMP_PATH/setup.lock"}
@vovimayhem
vovimayhem / docker-flow-stack.yml
Created March 12, 2019 01:55
Docker Flow example for Docker Swarm
# Deploy using `docker stack deploy -f docker-flow-stack.yml docker_flow`
version: '3.7'
networks:
network: # Allows referring to 'docker_flow_network' on other stacks
services:
proxy:
image: dockerflow/docker-flow-proxy:19.03.02-16
ports:
@vovimayhem
vovimayhem / docker-compose.yml
Created June 6, 2017 21:17
ELK stack example
version: "2"
volumes:
log-data:
driver: local
services:
elasticsearch:
image: elasticsearch:5.0
ports: