Skip to content

Instantly share code, notes, and snippets.

@jjhoncv
jjhoncv / table_dinamic_php.jade
Last active June 22, 2016 00:28
bucle dinamic with logic in PHP using jade
mixin table()
table
if block
block
mixin thead()
thead
tr
if block
block
@jjhoncv
jjhoncv / load_server.sh
Created February 29, 2016 21:03
load server
SERVER=root@107.170.85.219
BARE=/home/jhonnatan/bare/dmv.git
git clone $SERVER:$BARE
git remote add origin $SERVER:$BARE
ssh-copy-id -i ~/.ssh/id_rsa.pub $SERVER
@jjhoncv
jjhoncv / apache2.conf
Created January 27, 2016 16:32
403 Forbidden You don't have permission to access /folder-name/ on this server
vim /etc/apache2/apache2.conf
<Directory /home/jhonnatan/htdocs/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
vim /etc/apache2/sites-available/000-default.conf
En el ejemplo colocaremos dev2d
primero entrar a dev2d
ojo, si en el intento de ir a dev2d te aparacen "unable to link" u otro mensaje de estaticos, no problem ir a la raiz del proyecto y commitear esos cambios
git add --all
git commit -am "fix(files): update estaticos"
estando en dev2d entrar a la carpeta
@jjhoncv
jjhoncv / jade and object and array and PHP.jade
Last active October 26, 2017 10:59
Gits help to how to pass and array of objects to jade or multiline object jade also integration jade with php also jade with html
//- Is only jade with var text type
- var list = []
- list.push({status: "active", text: "option 1"})
- list.push({status: "", text: "option 2"})
- list.push({status: "", text: "option 3"})
each(item, index in list)
li(class="#{item.status}")
a= item.text

MySQL lower case table names sensitive in linux

Type in your terminal

sudo vim /etc/mysql/my.cnf

Edit the file adding the entry lower_case_table_names=1 just under the group definition: [mysqld]

MySQL lower case table names sensitive in linux

Type in your terminal

sudo vim /etc/mysql/my.cnf

Edit the file adding the entry lower_case_table_names=1 just under the group definition: [mysqld]

Comprimir archivos incluyendo sus rutas de acceso

Compress

tar -zcvf nombreDelArchivo.tar.gz public/js/modules/all.js frontend/js/application/yoson.js

UnCompress

<?php
define('OFFSET', 268435456);
define('RADIUS', 85445659.4471); /* $offset / pi() */
function lonToX($lon) {
return round(OFFSET + RADIUS * $lon * pi() / 180);
}
function latToY($lat) {
/* Some HTML5 Tags
*/
aside, footer, header, nav, section {
display: block;
}
/* Examples
*/