Skip to content

Instantly share code, notes, and snippets.

View javiercastrodev's full-sized avatar
🏠
Working from home

Javier Castro javiercastrodev

🏠
Working from home
View GitHub Profile
@javiercastrodev
javiercastrodev / package.json
Created October 24, 2017 23:26
Config Vue PHP
{
"name": "AlvanItunes",
"version": "1.0.0",
"description": "Temlate SASSS PHP",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Javier",
@javiercastrodev
javiercastrodev / gulpfile.js
Created October 24, 2017 23:25
gulp php + vuejs
'use strict';
var gulp = require('gulp'),
cache = require('gulp-cache'),
browserSync = require('browser-sync').create(),
reload = browserSync.reload,
changed = require('gulp-changed'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
plumber = require('gulp-plumber'),
@javiercastrodev
javiercastrodev / .htaccess
Created October 5, 2017 16:55 — forked from loorlab/.htaccess
.htaccess WordPress - 2017 *Use it according to your server and your preferences.* // In the next line change this name --> Header set X-Powered-By "LOOR Lab" --> for which you want to use.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EDIT 2019
# Set uploads folder user and group to www-data
chown www-data:www-data -R wp-content/uploads/
# Set uploads folder user and group to www-data
chown www-data:www-data -R wp-content/
# Set uploads folder user and group to www-data
@javiercastrodev
javiercastrodev / config.js
Created September 15, 2017 22:09
Change highlight text color in Visual Studio Code
Update: These ids have been changed and finalized,
see https://github.com/Microsoft/vscode/wiki/Color-customization-color-id-changes
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#220815",
"editor.selectionBackground": "#771835",
"editor.wordHighlightBackground": "#771835",
"editorCursor.foreground": "#F12360"
},
https://medium.com/@rgdev/how-to-install-laravel-5-4-on-ubuntu-16-04-from-scratch-quickly-29375e18e7ca
Install PHP 7.1
sudo update-alternatives --set php /usr/bin/php7.0
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
php -v
PHP 7.1 Modules list (Example)
@javiercastrodev
javiercastrodev / iterm2.md
Created January 20, 2017 04:50
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [
@javiercastrodev
javiercastrodev / SCRIPT PARA CAMBIAR URLS EN WORDPRESS
Last active April 24, 2018 14:59 — forked from hawkapparel/SCRIPT PARA CAMBIAR URLS EN WORDPRESS
SCRIPT PARA CAMBIAR URLS EN WORDPRESS || Con este script se actualiza las urls de la BD cuando se cambia de servidor un proyecto wordpress
-- UPDATE wp_posts SET guid = replace(guid, 'URL_ACTUAL','URL_A_USAR');
UPDATE wp_posts SET guid = replace(guid, 'http://tuurldeproduccion.com.pe/','http://localhost/tuproyecto');
UPDATE wp_posts SET post_content = replace(post_content, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto');
UPDATE wp_options SET option_value = replace(option_value, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto')
WHERE option_name = 'home' OR option_name = 'siteurl';
-- UPDATEEEEEEEEEEEE!!!!!!!!!
@javiercastrodev
javiercastrodev / app.html
Created May 12, 2016 23:46 — forked from wendydra/app.html
Aurelia - Materialize FileUpload Template Nesting Bug
<template>
<div>
<md-card md-image="http://66.media.tumblr.com/45af4564f8e5cb043a1c3b9c50ed4432/tumblr_meq4ckOLoT1rmmh9co1_500.jpg" md-title="Card title" md-reveal="true">
<div>
Observe the koi in its natural exploratory habitat.
</div>
<template replace-part="reveal-text">
<!--Uncomment this md-file section to see it bugging-->
<!--<md-file md-caption="upload file" view-model.ref="fileInput" md-label-value.bind="labelValue"></md-file>
<div if.bind="selectedFile">