Skip to content

Instantly share code, notes, and snippets.

View ms_add_my_custom_fields.php
* Plugin Name: Membership 2 - Change Reg/Prof Fields
* Plugin URI:
* Description: Adds Custom fields to Registration/Profile and removes Username
* Version: 1.0.0
* Author: Konstantinos Xenos @ WPMUDEV
* Author URI:
* License: GPLv2 or later
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
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
array (size=8)
'id' => int 1
'nome' => string 'usuário teste' (length=14)
'email' => string '' (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
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 '' (length=24)
'ativo' => int 1
View Sistema.php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Sistema extends Model
public function users()
View PapelUsuario.php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PapelUsuario extends Model
protected $table = 'papel_usuarios';
public function users()
View User.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() {
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() {
ambrosiora / getSelectedText.html
Last active February 19, 2019 19:15
Texto selecionado na página
View getSelectedText.html
<!DOCTYPE html>
<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.