Skip to content

Instantly share code, notes, and snippets.

View ms_add_my_custom_fields.php
<?php
/**
* Plugin Name: Membership 2 - Change Reg/Prof Fields
* Plugin URI: https://premium.wpmudev.org/
* Description: Adds Custom fields to Registration/Profile and removes Username
* Version: 1.0.0
* Author: Konstantinos Xenos @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
@ambrosiora
ambrosiora / nginx.conf
Created May 29, 2020 18:23 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View gist:586c6f01b1f74a59f4c40b6ccb7eecae
/var/www/html/app/Http/Controllers/AuthController.php:55:
array (size=8)
'id' => int 1
'nome' => string 'usuário teste' (length=14)
'email' => string 'uteste@gmail.com' (length=16)
'ativo' => int 1
'created_at' => string '2020-02-05 14:54:44' (length=19)
'updated_at' => string '2020-02-05 14:54:44' (length=19)
'sistemas' =>
array (size=2)
View toarray
/var/www/html/app/Http/Controllers/AuthController.php:55:
array (size=2)
0 =>
array (size=9)
'id' => int 1
'slug' => string 'accounts' (length=8)
'nome' => string 'Eadstock Accounts' (length=17)
'descricao' => string 'Gerenciador de contas de usuários' (length=34)
'subdominio' => string 'accounts.eadstock.com.br' (length=24)
'ativo' => int 1
View Sistema.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Sistema extends Model
{
public function users()
{
View PapelUsuario.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PapelUsuario extends Model
{
protected $table = 'papel_usuarios';
public function users()
View User.php
<?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Database\Eloquent\Model;
View highlight.js
$(document).ready(function() {
initHighlights();
});
var currentAnchor = null;
var tooltipPointerPositions = {
left: 46,
width: 14
};
View scroll and print jurega
function scroll(speed) {
$('html').animate({ scrollTop: $(document).height() - $(window).height() }, speed, function() {
window.print();
});
}
$(document).ready(function(){
scroll(2000);
});
@ambrosiora
ambrosiora / getSelectedText.html
Last active February 19, 2019 19:15
Texto selecionado na página
View getSelectedText.html
<!DOCTYPE html>
<html>
<head>
<title>teste</title>
</head>
<body>
<p id="paragrafo">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</body>