Skip to content

Instantly share code, notes, and snippets.

View devbeno's full-sized avatar
🕶️
Coding

Benjamin devbeno

🕶️
Coding
View GitHub Profile
#!/bin/bash
# Usage :
# Install a fresh Debian Jessie, then execute following shell command as root user
# wget --no-check-certificate -O - https://gist.githubusercontent.com/lspg/018425712d6d437def68922c2717f8af/raw | bash
############
# Settings #
############
@devbeno
devbeno / function.php
Last active October 17, 2021 07:57
Prikaz rata za mobishop.ba
<?php
/**
* Plugin Name: WooCommerce cijena na rate
* Description: Prikaz cijene na rate u zavisnosti od mjeseci te iznos jedne rate.
* Author: Benjamin Pelto
* Version: 1.0
* License: GPLv2 or later
*/
/**
@devbeno
devbeno / Dockerfile
Last active January 2, 2022 04:15
start1
FROM php:7.4.21-apache
ENV APACHE_DOCUMENT_ROOT /var/www/html/web
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN sed -i '/<Directory \${APACHE_DOCUMENT_ROOT}>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
RUN a2enmod rewrite
@devbeno
devbeno / docker-compose.yml
Last active January 2, 2022 04:16
start2
version: "3"
services:
www:
build: .
ports:
- 80:80
volumes:
- ./:/var/www/html/
links:
- db
@devbeno
devbeno / .htaccess
Created January 2, 2022 04:17
start3
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@devbeno
devbeno / mytheme.omp.json
Created March 14, 2022 20:25
mytheme.omp.json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"leading_diamond": "\u256d\u2500\ue0b6",
#!/bin/bash
if [ -z $2 ]
then
echo > $1
echo "# Each commit message consists of a header, a body and a footer." >> $1
echo "# Header format is of the following “<type>(<scope>): <subject>” (scope is optional)" >> $1
echo "# exemple -> :build:(npm) update linter version"
echo >> $1
echo "# Available types" >> $1
#!/bin/sh
msg=`cat $1`
msg=`echo "$msg" | sed 's/:tada:/🎉/'`
msg=`echo "$msg" | sed 's/:revert:/⏳/'`
msg=`echo "$msg" | sed 's/:build:/📦/'`
msg=`echo "$msg" | sed 's/:ci:/🤖/'`
msg=`echo "$msg" | sed 's/:docs:/📖/'`
msg=`echo "$msg" | sed 's/:feat:/🌟/'`
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Illuminate\View\Factory;
use Illuminate\Events\Dispatcher;
use Illuminate\View\FileViewFinder;
use Illuminate\Filesystem\Filesystem;
use Illuminate\View\Engines\PhpEngine;
use Illuminate\View\Engines\EngineResolver;
{
"version": "2",
"templates": [
{
"type": 3,
"title": "Budibase",
"categories": ["Tools"],
"description": "Build modern business apps in minutes",
"logo": "https://budibase.com/favicon.ico",
"platform": "linux",