Skip to content

Instantly share code, notes, and snippets.

View 3m1n3nc3's full-sized avatar
๐Ÿ˜œ
Not hearing word

Legacy 3m1n3nc3

๐Ÿ˜œ
Not hearing word
View GitHub Profile
@3m1n3nc3
3m1n3nc3 / Kernel.php
Created November 14, 2021 16:08 — forked from davidrushton/Kernel.php
Laravel 5 Database Queue - Shared Hosting
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@3m1n3nc3
3m1n3nc3 / API_RECOMMEND.md
Last active May 3, 2023 16:39
Recommendations for simple COde Camp REST Implementations.

RESPONSE AND IMPLEMENTATION

  1. Validation errors should return 422 response code.
  2. Authentication errors should return 401 response code.
  3. All request to save data should implement the POST http request method.
  4. All request to update data should implement the PUT http request method.
  5. All request to delete data should implement the DELETE http request method.
  6. Successfull POST requests to create new records should return 201 response code.
  7. Successfull GET requests should return 200 response code.
  8. Successfull PUT, DELETE requests should return 202 response code.
  9. If something goes wrong, return 400 response code.
@3m1n3nc3
3m1n3nc3 / AgrobaysChangelog.md
Created April 25, 2022 18:28
Agrobays (Changelog)

Agrobays (Changelog)

v1.0.4 Beta

  1. Allow preloading of cofiguration options and chart data.
  2. Improved user experience for image uploads.
  3. Remove datatables and use custom built components.
  4. Improve general styling and user experience.
  5. Improve performance.
  6. Fixed multiple bugs.
@3m1n3nc3
3m1n3nc3 / 2019-https-localhost.md
Created May 6, 2022 01:26 — forked from hrace009/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@3m1n3nc3
3m1n3nc3 / .htaccess
Last active March 24, 2025 22:33
Perfect .htaccess file for SPA hosting on Apache servers
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
# No caching for all files
@3m1n3nc3
3m1n3nc3 / BlobImage.vue
Created August 31, 2022 03:28 — forked from nebaughman/BlobImage.vue
Load image with ajax (axios) as blob data in Vue component
<template>
<img ref="image" :src="blobUrl" @load="loaded"/>
</template>
<script>
import axios from "axios"
/**
* Load an image url as a blob
*/
@3m1n3nc3
3m1n3nc3 / nginx.conf
Created January 27, 2023 02:00
Hidding .php and .html file extension from URL on Nginx
location / {
try_files $uri $uri.html $uri/ @extensionless-php;
index index.html index.htm index.php;
}
location ~ \.php$ {
try_files $uri =404;
}
location @extensionless-php {
@3m1n3nc3
3m1n3nc3 / PaystackHandler.vue
Last active April 19, 2023 06:16
An elegant VUE/Quasar component to handle all paystack payment initialization and verification. This gist is a custom solution built originally for use in the Quasar framework, you can customize and use for other vue projects as well.
<template>
<q-btn @click="initializeNewPayment()" v-if="!hidden">
<q-tooltip v-if="tooltip">
<q-icon v-if="tooltipIcon" :name="tooltipIcon" /> {{ tooltip }}
</q-tooltip>
</q-btn>
</template>
<script>
import { QSpinnerPuff } from "quasar";
# 3m1n3nc3 ffmpeg_installer.sh to run all commands:
#root@cloudpanel:~# nano ffmpeg_installer.sh
#root@cloudpanel:~# chmod +x ffmpeg_installer.sh
#root@cloudpanel:~# ./ffmpeg_installer.sh
apt-get update
apt-get -y install autoconf automake cmake tclsh build-essential pkg-config git-core libssl-dev \
libvorbis-dev libx265-dev libx264-dev libass-dev libgpac-dev libsdl1.2-dev libtheora-dev \
libtool libvdpau-dev libfontconfig-dev libfreetype-dev libssh-dev libaom-dev
mkdir ~/ffmpeg_sources
@3m1n3nc3
3m1n3nc3 / permissions.php
Created July 12, 2023 10:43
Recursively change file and directory permissions with php
<?
header('Content-Type: text/plain');
/**
* Changes permissions on files and directories within $dir and dives recursively
* into found subdirectories.
*/
function chmod_r($dir, $dirPermissions, $filePermissions) {
$dp = opendir($dir);