Skip to content

Instantly share code, notes, and snippets.

View josecaos's full-sized avatar
👹
filling squares

Jose Carlos Hasbun josecaos

👹
filling squares
View GitHub Profile
@josecaos
josecaos / on-sale.php
Last active December 20, 2018 19:46
Woocommerce on sale products page
From Woocommerce 3.3 you can use
[sale_products limit=’10’ paginate=’true’]
@josecaos
josecaos / public_ip.txt
Last active September 10, 2018 19:47
Public IP from terminal
// Only IP
dig +short myip.opendns.com @resolver1.opendns.com
// Or everything:
dig myip.opendns.com @resolver1.opendns.com
@josecaos
josecaos / raspi3-config.txt
Last active July 17, 2018 05:58
Raspi3 force HDMI at boot
#This may work if your image does not boot with HDMI
#Edit system-boot/config.txt
#Force HDMI in raspberryPi 3
config_hdmi_boost=4
hdmi_mode=16
hdmi_force_hotplug=1
hdmi_drive=2
@josecaos
josecaos / gist:2c2227c543dbbf6be137a6ee9d512352
Created July 3, 2018 04:03
Find server's 'php.ini' file in use
php -i|grep 'php.ini'
@josecaos
josecaos / gist:594ab6bbc79a4f3da6db1c85420f04cc
Last active June 27, 2018 06:28
python3 virtual enviroment
//Comand-line: Crea el ambiente de trabajo para localizar las dependencias del proyecto y seleccionar la version de python3
//default method
virtualenv -p python3 envname
//recomended method
python3 -m venv venvname
//start enviroment linux
source env/bin/activate
@mixin prefix($name, $argument) {
-webkit-#{$name}: #{$argument};
-ms-#{$name}: #{$argument};
-moz-#{$name}: #{$argument};
-o-#{$name}: #{$argument};
#{$name}: #{$argument};
}
@mixin linear-gradient($fromColor, $toColor) {
background-color: $toColor; /* Fallback Color */
@josecaos
josecaos / gist:4e41e1be04d53b8a0cb8eeb2c087f0c7
Created October 23, 2016 22:37
Actualiza submodulos de git
//git 1.7.2 ++
git submodule update --recursive --remote
//avoid asking for pswd over http
//source: https://help.github.com/articles/caching-your-github-password-in-git/
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'