Skip to content

Instantly share code, notes, and snippets.

View Loupeznik's full-sized avatar

Dominik Zarsky Loupeznik

View GitHub Profile
Loupeznik / deployment.yaml
Created August 7, 2023 16:31
Laravel app service and deployment sample manifests (partly for Helm)
apiVersion: apps/v1
kind: Deployment
name: {{ include "laravel-app.fullname" . }}
{{- include "laravel-app.labels" . | nindent 4 }}
{{- include "laravel-app.selectorLabels" . | nindent 6 }}
Loupeznik / bracket.html
Last active July 31, 2022 10:05
Playoffs bracket Tailwind component
<div class="m-2 p-4">
<div class="mb-4 grid grid-flow-col grid-cols-3 items-center border-0 border-b-2 border-gray-200 text-center text-base md:text-lg font-bold uppercase">
<div class="grid grid-flow-col grid-cols-3 items-center">
<div class="grid grid-flow-row grid-rows-3">
<div class="mb-4 rounded-md bg-gray-200 px-4 py-2 text-gray-900 space-y-2 text-xs md:text-base">
<div class="grid grid-flow-col grid-cols-2">
Loupeznik / google-signin.html
Last active June 16, 2022 08:04
Google sign-in
<button onClick="ggl()">sign in with gugul</button>
function ggl() {
Loupeznik / api_usage.blade.php
Last active March 22, 2021 15:40
API usage blade file example
<div class="flex flex-col mt-3">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
<h2 class="font-semibold text-xl text-gray-800 leading-tight m-4">
My API usage
<div class="bg-gray-200 flex items-center justify-center px-5 py-5">
<div class="w-full max-w-3xl">
<div class="-mx-2 md:flex">
Loupeznik / DashboardController.php
Last active September 17, 2022 12:21
Laravel Visitor Counter - data visualization
// app/Http/Controllers/DashboardController.php
namespace App\Http\Controllers;
use App\Models\Visitor;
use Illuminate\Support\Facades\DB;
class DashboardController extends Controller
import requests
url = ""
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer xxxxx' #add your API token
Loupeznik /
Last active February 23, 2021 21:27
Mega backup script sample for my Medium post
mega-login username password #placeholder values
cur_month="$(date +%Y-%m)"
stime=$(date +"%s")
echo "[MEGA BACKUP] Starting backup script"
if [[ $folders == *$cur_month* ]]; then