Skip to content

Instantly share code, notes, and snippets.

View jassriver's full-sized avatar
:shipit:
WordPress Today, WordPress Tomorrow, WordPress Always!

River jassriver

:shipit:
WordPress Today, WordPress Tomorrow, WordPress Always!
View GitHub Profile
@jassriver
jassriver / multiple_ssh_setting.md
Created June 14, 2023 12:01 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@jassriver
jassriver / index.php
Created June 6, 2023 19:33
pegar_filmes_de_2_anos_atras_ate_agora
<?php
$ano_atual = date('Y');
$dois_anos_atras = $ano_atual - 2;
$args = array(
'post_type' => 'filmes',
'meta_query' => [
'relation' => 'AND',
[
'key' => 'genero',
'value' => 'ação',
@jassriver
jassriver / README.md
Created May 24, 2023 03:31 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@jassriver
jassriver / my_ps1_prompt_color_favorite.md
Last active October 20, 2022 09:22
Minha cor favorita do prompt no centos 7 :3

Minha cor favorita do prompt do terminal no Centos 7 xD

PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'

Para tornar a cor permante, insira em

/etc/bashrc

(você pode encontrar o diretório verificando o arquivo .bashrc no diretório /root)

@jassriver
jassriver / db-conventions.md
Created May 13, 2022 17:17 — forked from thiamsantos/db-conventions.md
Convenções de nomenclatura para banco de dados

Convenções de nomenclatura para banco de dados

Geral

Os nomes das tabelas e colunas devem estar minúsculas e as palavras devem ser separadas por underscore, seguindo o padrão snake case. E todos os termos devem estar em inglês, exceto alguns termos que não há tradução apropriada para o inglês. Sempre prefira nomes descritivos, evitando ao máximo contrações.

Tabelas

Os nomes das tabelas devem estar no plural.

@jassriver
jassriver / README.md
Created January 2, 2022 22:02 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@jassriver
jassriver / lets_encrypt_cli_vestacp.md
Created July 19, 2021 15:12
Let's Encrypt CLI VestaCP
v-add-letsencrypt-domain USER DOMAIN [ALIASES] [RESTART]
v-add-letsencrypt-user USER [EMAIL]
v-check-letsencrypt-domain USER DOMAIN
v-list-letsencrypt-user USER [FORMAT]
v-sign-letsencrypt-csr USER DOMAIN CSR_DIR [FORMAT]
v-update-letsencrypt-ssl
@jassriver
jassriver / fix_vestacp_admin_panel_ssl.md
Created July 19, 2021 15:11
Fix VestaCP Admin Panel SSL
cd /usr/local/vesta/ssl
mv certificate.crt certificate.crt_old
mv certificate.key certificate.key_old
cp /home/admin/conf/web/ssl.[Domain].crt /usr/local/vesta/ssl/certificate.crt
cp /home/admin/conf/web/ssl.[Domain].key /usr/local/vesta/ssl/certificate.key
@jassriver
jassriver / Query SQL para mudar a url do Wordpress.md
Created June 27, 2021 23:52
Query em SQL para mudar completamente a url do wordpress

Query SQL para mudar a url do Wordpress

Fique atento ao uso correto do prefixo da tabela do wordpress.

No caso deste exemplo, foi usado o prefixo wp_

UPDATE wp_options SET option_value = replace(option_value, 'antigaurl', 'novaurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'antigaurl','novaurl');
UPDATE wp_posts SET post_content = replace(post_content, 'antigaurl', 'novaurl');
@jassriver
jassriver / vanilla-api.md
Created April 26, 2021 19:31 — forked from dexit/vanilla-api.md
Building a Simple Web API with Vanilla PHP