Skip to content

Instantly share code, notes, and snippets.

View ratacibernetica's full-sized avatar

Martín Roldán-Araujo ratacibernetica

View GitHub Profile
@ratacibernetica
ratacibernetica / phpcs-mac-os-howto.md
Created July 28, 2017 03:45 — forked from klederson/phpcs-mac-os-howto.md
How to setup PHP CodeSniffer into PHP Storm with Mac OSX

Good Practices

PHP CodeSniffer into PHP Storm

Install PHPCS in mac

sudo cp /private/etc/php.ini.default /private/etc/php.ini;
sudo php /usr/lib/php/install-pear-nozlib.phar;
pear config-set php_ini /private/etc/php.ini;
@ratacibernetica
ratacibernetica / xampp_php7_xdebug.md
Created October 16, 2017 18:04 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@ratacibernetica
ratacibernetica / poc_image_search.html
Created October 23, 2017 18:48
Image searcher using Bing image Search API
<div class="prd-gallery">
<div class="title"></div>
<div class="contents"></div>
</div>
<script>
//PoC only, remove before final version
const loadImagesFromTheWeb = (q) => {
if (q) {
$.ajax({
@ratacibernetica
ratacibernetica / datepicker.conf.js
Last active November 6, 2017 15:41
Datepicker exclude weekends and past dates
$(".datepicker").datepicker({
minDate:new Date(), //disable past days
beforeShowDay: $.datepicker.noWeekends //disable weekends
});
@ratacibernetica
ratacibernetica / gist:ca5ceda4d5ed725687791d167bb6232b
Created February 15, 2018 16:08
Composer for automated deployment
composer.phar install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
@ratacibernetica
ratacibernetica / sample.html
Created May 26, 2018 04:02
embedded google doc, able to print (sorta)
<html>
<head>
<title>Mi super CV </title>
<style>
iframe{
top:0px; left:0px; bottom:0px; right:0px; width:100%; height:4000px; border:none; margin:0; padding:0; overflow:hidden; z-index:-1;
}
@media print {
@ratacibernetica
ratacibernetica / memo_install_zsh.sh
Last active May 28, 2018 16:40 — forked from nukesaq88/memo_install_zsh.sh
zsh install memo on CentOS6 (with zsh-autosuggestions)
#
echo installing zsh
sudo yum -y install zsh
#update possibly needed in centos
#yum update -y nss curl libcurl
#install oh-my-zsh
#git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
#cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
#change login shell
#chsh -s zsh
@ratacibernetica
ratacibernetica / docker-hosts.md
Last active June 25, 2018 19:37
Docker compose in HostUS.US

What? Why?

HostUs.us is a hosting company that offers a cheap VPS package, capable of running docker, although only provides an ancient docker version: 1.7.1

If you want to run modern docker stuff, you can't 'because of the version constraint.

i.e. If you try to run yum install docker-compose it'll install it but will cause errors.

Luckily, you can install a compatible docker-compose by doing:

@ratacibernetica
ratacibernetica / install-python-2.7.sh
Created June 5, 2018 15:13
Install Python 2.7 on Centos
# install GCC
yum install gcc openssl-devel bzip2-devel
# Download Python 2.7 & extract
cd /usr/src
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
tar xzf Python-2.7.15.tgz
# Install Python 2.7
cd Python-2.7.15
# Add Node.js Yum Repository
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
# Install Node.js and NPM
yum install nodejs
# Check Node.js and NPM Version
npm -v