Skip to content

Instantly share code, notes, and snippets.

View gnovaro's full-sized avatar
:octocat:
Adding lines to the open source

Gustavo Novaro gnovaro

:octocat:
Adding lines to the open source
View GitHub Profile
@LVoogd
LVoogd / rector.php
Created June 14, 2022 09:48
Rector script to migrate annotations to attributes
<?php
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\SensiolabsSetList;
use Rector\Nette\Set\NetteSetList;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
@yanivmn
yanivmn / open-source-sso.md
Last active June 18, 2024 07:22 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations
Aerobase Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes third-party
Multi-factor authentication yes yes yes yes yes yes yes
Admin UI yes yes yes yes yes yes no
OpenJDK support yes yes yes yes no
Identity brokering yes yes yes
Middleware NGINX, Wildfly Wildfly, JBOSS WSO2 Carbon Jetty, Apache HTTPD any Java app server any Java app server Jetty, Tomc
@meigwilym
meigwilym / console.php
Last active March 5, 2024 02:20
Laravel Create User Command
<?php
// routes/console.php
// quickly create an user via the command line
Artisan::command('user:create', function () {
$name = $this->ask('Name?');
$email = $this->ask('Email?');
$pwd = $this->ask('Password?');
// $pwd = $this->secret('Password?'); // or use secret() to hide the password being inputted
\DB::table('users')->insert([
@anvk
anvk / psql_useful_stat_queries.sql
Last active June 28, 2024 08:55
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@Razoxane
Razoxane / laravel_conditional_index_migration.php
Created August 8, 2017 01:35
Laravel - Create Index If Not Exists / Drop Index If Exists
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class LaravelConditionalIndexMigration extends Migration
{
/**
* Run the migrations.
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active June 11, 2024 10:46
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@h4
h4 / env.py
Last active June 20, 2024 13:00
Setup alembic to work properly with PostgreSQL schemas
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
from models import Base
config = context.config
fileConfig(config.config_file_name)
@marktopper
marktopper / PageController.php
Last active December 24, 2020 20:55
[Voyager] Routes for Pages BREAD
<?php
class PageController extends \App\Http\Controllers\Controller
{
public function show()
{
$slug = request()->segment(1);
$page = \TCG\Voyager\Models\Page::where('slug', $slug)
->firstOrFail();
@cstroe
cstroe / OpenSourceCRM.rst
Last active June 25, 2024 20:24
A distilled list of open-source CRM software