Skip to content

Instantly share code, notes, and snippets.

View rodrigopedra's full-sized avatar

Rodrigo Pedra Brum rodrigopedra

  • São Carlos, Brazil
View GitHub Profile
@rodrigopedra
rodrigopedra / toggle-decorations.c
Created October 23, 2023 18:51 — forked from muktupavels/toggle-decorations.c
Simple app to toggle window decorations.
/*
* Copyright (C) 2017 Alberts Muktupāvels
*
* 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
<?php
/**
* PHP XML to dynamic table
*
* @link http://stackoverflow.com/q/16997835/367456
*/
require('.../Iterator-Garden/src/autoload.php'); // for DecoratingIterator - use development branch
@rodrigopedra
rodrigopedra / BladeServiceProvider.php
Last active December 8, 2022 09:47
Blade Optimizations
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\View\Compilers\BladeCompiler;
// @see https://laravel-news.com/faster-laravel-optimizations
class BladeServiceProvider extends ServiceProvider
{
@rodrigopedra
rodrigopedra / README
Created September 15, 2022 18:15 — forked from awerlang/README
A zypper wrapper that maximizes network throughput
zypper-download
===============
Downloads packages using any amount of available openSUSE mirrors.
Installation
------------
Copy both files to the following locations:
export default defineConfig({
plugins: [
laravel(['resources/js/app.js']),
{
name: 'ziggy',
enforce: 'post',
handleHotUpdate({ server, file }) {
if (file.includes('/routes/') && file.endsWith('.php')) {
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`))
}
@rodrigopedra
rodrigopedra / stream_file.php
Created May 9, 2022 07:16 — forked from fideloper/stream_file.php
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';
### Flatpak Repos
List packages on a repo :
flatpak remote-ls repon-name --user
flatpak remote-ls
Install packages :
flatpak --user install repo-name package-name io.liri.Platform
Flathub:
@rodrigopedra
rodrigopedra / generate.php
Created April 17, 2022 04:22
PHP import CSV
<?php
$file = fopen('php://output', 'w');
fputcsv($file, ['ID', 'NAME', 'AGE']);
for ($index = 0; $index < 21_000_000; $index++) {
fputcsv($file, [$index + 1, bin2hex(random_bytes(20)), random_int(18, 65)]);
}
@rodrigopedra
rodrigopedra / Akonadi-MySQL-workaround.md
Created January 5, 2022 18:59 — forked from aldolat/Akonadi-MySQL-workaround.md
If MySQL is installed, Akonadi doesn't work anymore. This is a possible workaround to get Akonadi back to work.
@rodrigopedra
rodrigopedra / userChrome.css
Last active April 26, 2021 11:11
Customize Firefox Proton Tabs
/*
@see https://www.reddit.com/r/FirefoxCSS/comments/73dvty/tutorial_how_to_create_and_livedebug_userchromecss/
@see https://www.reddit.com/r/firefox/comments/mxqc71/this_community_complains_a_lot_but_this_time_i/
@see https://gist.github.com/Speedy37/63d37931601123178ac2221533292cdd
*/
.tab-stack {
margin-top: 1px;
}
.tabbrowser-tab {
margin: 0px !important;