This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Contact form 7 | |
* custom tag: [posts show:12] | |
* show parameter is optional | |
*/ | |
add_action('wpcf7_init', 'custom_add_form_tag_posts'); | |
function custom_add_form_tag_posts() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Caracteres en español usando CapsLock | |
; Presionar CapsLock mas la vocal para acentuarla | |
; Para la ñ se puede usar la n o la tecla ; (porque ahí estaba la ñ originalmente) | |
; Para la ¿ usamos CapsLock y la tecla que tiene actualmente el ? | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; mapear la n como ñ | |
CapsLock & n:: | |
If GetKeyState("Shift", "P") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache | |
sudo a2dismod php7.1 | |
sudo a2enmod php7.3 | |
sudo service apache2 restart | |
# Command Line | |
sudo update-alternatives --set php /usr/bin/php7.3 | |
sudo update-alternatives --set phar /usr/bin/phar7.3 | |
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.3 | |
sudo update-alternatives --set phpize /usr/bin/phpize7.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 " basic | |
set nocompatible " basic | |
filetype off " basic | |
filetype plugin on " Enable filetype plugins | |
filetype indent on " Enable loading the indent file for specific file types | |
syntax enable " Enable syntax highlighting | |
set encoding=utf-8 " Encoding (needed in youcompleteme) | |
set fileencoding=utf-8 " The encoding written to file. | |
set noerrorbells " No annoying sound on errors | |
set number " Line numbers on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reload tmux config | |
bind r source-file ~/.tmux.conf | |
# one of these should work: | |
# set -g default-terminal tmux-256color | |
# set -g default-terminal xterm-256color | |
# neovim :checkhealth suggests | |
set -g default-terminal screen-256color | |
set-option -sa terminal-overrides ',xterm-256color:RGB' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Variables necesarias en tu entorno | |
W='/home/lalo/www' | |
VHOSTS_NGINX='/etc/nginx/sites-enabled' | |
USER_LOCAL='lalo' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" this is the command used in this video: https://www.youtube.com/watch?v=YnaCMqSOYEA | |
" put it in register q with "qyiW | |
" Execute with :g/className/norm@q | |
" Dont forget to add keyword separators :set iskeyword+=- :set iskeyword+=: | |
0/className^Mf=llvi"^[:s/\%V\</tw-^M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jslive [yourfile.js] | |
# Test your javascript in a live reload environment | |
# Opens tmux with vim in the left, nodemon in the right | |
# Requires tmux and nodemon npm install -g nodemon | |
function jslive () { | |
# $# is args number | |
if [ $# -eq 0 ] && file=tmp.js || file=$1 | |
# Create file | |
touch $file | |
# split with tmux, left is vim, right is node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fetch = require('node-fetch'); | |
async function activos(claveMunicipio) { | |
let response = await fetch('https://coronavirus.gob.mx/datos/Overview/info/getInfo.php', { | |
headers: { | |
accept: '*/*', | |
'accept-language': 'es,es-ES;q=0.9,en;q=0.8', | |
'cache-control': 'no-cache', | |
'content-type': 'multipart/form-data; boundary=----WebKitFormBoundaryWUKVwTBDWw1CIYBb', | |
pragma: 'no-cache', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This mapping combination with FZF feels great! | |
" See how this works: https://gfycat.com/wellgroomedofficialblueandgoldmackaw | |
" Buffers change with index and middle | |
nnoremap <C-j> :bn<CR> | |
nnoremap <C-k> :bp<CR> | |
" Index finger to filter lines in all buffers with jump to line | |
nnoremap <leader>j :Lines<CR> |
OlderNewer