Skip to content

Instantly share code, notes, and snippets.

View object505's full-sized avatar
:octocat:
Hacking and whacking code

Bojan Petkovski object505

:octocat:
Hacking and whacking code
View GitHub Profile
@object505
object505 / SerialProvider.tsx
Created February 27, 2025 07:59 — forked from joshpensky/SerialProvider.tsx
Web Serial API + React
import {
createContext,
PropsWithChildren,
useContext,
useEffect,
useRef,
useState,
} from "react";
// RESOURCES:
@object505
object505 / langJson.php
Created November 6, 2024 20:00 — forked from renzocastillo/langJson.php
Convert Laravel language files from PHP to JSON
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class LangFilesToJson extends Command
{
/**
* The name and signature of the console command.
@object505
object505 / ploi-mastodon-nginx.conf
Created November 4, 2024 22:41 — forked from mattstein/ploi-mastodon-nginx.conf
Ploi nginx Config for Mastodon
# Ploi Webserver Configuration, do not remove!
include /etc/nginx/ploi/t00t.cloud/before/*;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream backend {
server 127.0.0.1:3000 fail_timeout=0;
@object505
object505 / button.html
Created August 7, 2024 13:43 — forked from jvandyke/button.html
Replace text in an element with CSS
<button class="element">Old text</button>
@object505
object505 / reverb-instructions.md
Created June 30, 2024 11:20 — forked from lewislarsen/reverb-instructions.md
Instructions for how to setup Laravel Reverb in Production.

Reverb Walkthrough

This is a walkthrough of how to configure Laravel Reverb for production using services like Laravel Forge or Ploi. The first step is nginx configuration changes, then .env changes and finally spinning up your Reverb server.

1. Configuring Nginx

Ensure your nginx site configuration has the following inside the server block:

 location /app {
@object505
object505 / MeiliSearch.md
Created June 18, 2024 12:02 — forked from eliyas5044/MeiliSearch.md
MeiliSearch installation and configuration.
var five = require("johnny-five"); // or "../lib/johnny-five.js" if you're in the repo
var keypress = require("keypress");
var board = new five.Board();
function controller(ch, key) {
console.log(ch, key);
}
board.on("ready", function() {
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@object505
object505 / xdebug_installation_on_linux.md
Created June 3, 2020 22:07 — forked from RazaChohan/xdebug_installation_on_linux.md
Walkthrough for installing xdebug for php 7 on linux and enabling its support for phpstorm.

Xdebug Installation

Please follow the following steps to configure Xdebug on Linux.


Tested on