Skip to content

Instantly share code, notes, and snippets.

View yriveiro's full-sized avatar
🧙‍♀️
Practicioner of Arcane and Forgotten Sorcery

Yago Riveiro yriveiro

🧙‍♀️
Practicioner of Arcane and Forgotten Sorcery
View GitHub Profile
@yriveiro
yriveiro / pre-commit.php
Created July 13, 2018 22:48 — forked from jmauerhan/pre-commit.php
A pre-commit hook written in php to fix code style and alert about phpmd rules
#!/usr/bin/php
<?php
require __DIR__ . '/../../vendor/autoload.php';
/**
* Dependencies:
* - Symfony Console Component: symfony/console
* - Symfony Process Component: symfony/process
* - PHP Mess Detector: phpmd/phpmd
@yriveiro
yriveiro / Calisthenics.md
Created February 1, 2018 11:30 — forked from bobuss/Calisthenics.md
The 9 Rules of Object Calisthenics

Object Calisthenics outlines 9 basic rules to apply when performing the exercise:

  • One level of indentation per method.
  • Don't use the ELSE keyword.
  • Wrap all primitives and Strings in classes.
  • First class collections.
  • One dot per line.
  • Don't abbreviate.
  • Keep all classes less than 50 lines.
  • No classes with more than two instance variables.
@yriveiro
yriveiro / 1. Install Redis
Created October 16, 2017 09:10 — forked from pbolduc/1. Install Redis
Install redis on CentOS 7
# see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/
# --- Compiling ---
$ yum install gcc make tcl
$ REDIS_VER=3.2.3
$ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz
$ tar xzvf redis-$REDIS_VER.tar.gz
$ cd redis-$REDIS_VER
$ make
$ make test
@yriveiro
yriveiro / gdbinit
Created October 3, 2017 20:37 — forked from CocoaBeans/gdbinit
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net
@yriveiro
yriveiro / seal.sh
Last active October 31, 2017 22:05
Ovirt seal script for VM template
#!/usr/bin/env bash
yum clean all
rm -rf /var/cache/yum
> /etc/machine-id
rm -f /etc/ssh/ssh_host_rm -rf /root/.ssh/
rm -f /root/anaconda-ks.cfg
rm -f /root/.bash_history
unset HISTFILE
rm -f /var/log/boot.log
@yriveiro
yriveiro / custom.js
Created September 6, 2017 09:05 — forked from askmike/custom.js
gekko/issue#502
// helpers
var _ = require('lodash');
var log = require('../core/log.js');
// configuration
var config = require('../core/util.js').getConfig();
// let's create our own method
var method = {};
// prepare everything our method needs
@yriveiro
yriveiro / gist:137cf03610922f3545d6c302e3458bc4
Created August 29, 2017 17:52
Bootable USB drive within OSX for a Debian installation
# Requirements:
# - pen drive formatted in FAT
# - boot.img.gz downloaded from: http://ftp.debian.org/debian/dists/Debian6.0.2/main/installer-amd64/current/images/hd-media/
# - netinstall iso image http://cdimage.debian.org/debian-cd/6.0.2.1/amd64/iso-cd/
# - pen drive is on /dev/disk1 -> check with "diskutil list"
diskutil unmountDisk /dev/disk1
gzip -dc boot.img.gz >/dev/disk1
diskutil eject /dev/disk1
# mount pen drive again
# add iso image to the pen drive

Keybase proof

I hereby claim:

  • I am yriveiro on github.
  • I am yriveiro (https://keybase.io/yriveiro) on keybase.
  • I have a public key ASBwZ8WeYrjRuoVsXy5hDUVMsMDZB0Fq8F118hOkmUbETwo

To claim this, I am signing this object:

@yriveiro
yriveiro / clamav-mac.md
Created August 7, 2017 15:42 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@yriveiro
yriveiro / vim
Created March 13, 2017 16:27
vimrc
"
" ██╗ ██╗ ██╗ ███╗ ███╗ ██████╗ ██████╗
" ██║ ██║ ██║ ████╗ ████║ ██╔══██╗ ██╔════╝
" ██║ ██║ ██║ ██╔████╔██║ ██████╔╝ ██║
" ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║ ██╔══██╗ ██║
" ██╗╚████╔╝ ██║ ██║ ╚═╝ ██║ ██║ ██║ ╚██████╗
" ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
"
""""""""""""""""""""""""""""""