Skip to content

Instantly share code, notes, and snippets.


Martín Roldán Araujo ratacibernetica

Block or report user

Report or block ratacibernetica

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ratacibernetica /
Created Nov 29, 2019
speedtest from command line with bash
#! /bin/bash
curl -s | python -
View vimrc
syntax on
filetype plugin indent on
set swapfile
set dir=/tmp
set nu
set expandtab ts=4 sw=4 ai
let mapleader=","
imap ,w <ESC>:w<CR>
imap jj <ESC>
nnoremap <Leader>w :w<CR>
ratacibernetica /
Created Oct 23, 2019
phpunit run automatically with inotifywait (linux)
while true; do
FILE=$(inotifywait tests/*/*.php --format="%w%f" ) &&
clear &&
vendor/bin/phpunit --color $FILE
ratacibernetica /
Created Oct 23, 2019
run phpunit automatically with watchman
watchman-make -p 'app/**/*.php' 'tests/**/*.php' --make=vendor/bin/phpunit -t tests
ratacibernetica / autossh-vnc-tunnel.service
Created Aug 29, 2019
autossh reverse ssh tunnel vnc on boot using systemd
View autossh-vnc-tunnel.service
#file: /etc/systemd/system/autossh-vnc-tunnel.service
Description=AutoSSH tunnel service everything
ExecStart=/usr/bin/autossh -M 0 -N -o "ExitOnForwardFailure=yes" -o "PubkeyAuthentication=yes" -o "StrictHostKeyChecking=false" -o "PasswordAuthentication=no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 5903:localhost:5901 -i /home/pi/.ssh/id_rsa user@server -p1234
# this-account-is-currently-not-available-error-when-trying-to-ssh
su -l www-data -s /bin/bash
View filter_array.php
* Removes unwanted key|values from array.
* @param array $filters
* @return array
function applyFilters(array $request){
$allowedFields = ['field_1','field_2','field_3','field_4'];
$filters = array_intersect_key($request, array_flip($allowedFields));
return $filters;
ratacibernetica / slow_query_log_on.sql
Last active Jun 7, 2019
mysql enable slow query log
View slow_query_log_on.sql
SET GLOBAL general_log = 'ON';
SET GLOBAL slow_query_log = 'ON';
-- set global slow_query_log_file = 'path';
ratacibernetica / EnsureQueueListenerIsRunning.php
Last active May 28, 2019 — forked from ivanvermeyen/EnsureQueueListenerIsRunning.php
Ensure that the Laravel queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job:
View EnsureQueueListenerIsRunning.php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
* The name and signature of the console command.
adb exec-out "while true; do screenrecord --bit-rate=8m --output-format=h264 --time-limit 180 -; done" | ffplay -framerate 60 -framedrop -bufsize 16M -
You can’t perform that action at this time.