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 / mysql li jream
Created December 19, 2019 13:46
Mysqli Class
<?php
/**
* Simple MySQLi Class 0.3
*
* @author JReam
* @license GNU General Public License 3 (http://www.gnu.org/licenses/)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 3 of the License, or
@jassriver
jassriver / ResizeImage.php
Created September 20, 2020 11:17 — forked from egulhan/ResizeImage.php
Resize Image Class With PHP
<?php
// @source: http://www.paulund.co.uk/resize-image-class-php
/**
* Resize image class will allow you to resize an image
*
* Can resize to exact size
* Max width size while keep aspect ratio
* Max height size while keep aspect ratio
* Automatic while keep aspect ratio
@jassriver
jassriver / curl_progress.php
Created October 23, 2020 21:56 — forked from bdunogier/curl_progress.php
PHP/cURL download progress monitoring
<?php
file_put_contents( 'progress.txt', '' );
$targetFile = fopen( 'testfile.iso', 'w' );
$ch = curl_init( 'http://ftp.free.org/mirrors/releases.ubuntu-fr.org/11.04/ubuntu-11.04-desktop-i386-fr.iso' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch, CURLOPT_NOPROGRESS, false );
curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, 'progressCallback' );
curl_setopt( $ch, CURLOPT_FILE, $targetFile );
@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
@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 / 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 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 / 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"