Skip to content

Instantly share code, notes, and snippets.

View hasinhayder's full-sized avatar
🚀
Back on track, yayyyy!

Hasin Hayder hasinhayder

🚀
Back on track, yayyyy!
View GitHub Profile
# SETUP #
DOMAIN=example.com
PROJECT_REPO="[email protected]:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@hasinhayder
hasinhayder / composition.html
Created December 25, 2023 16:32
Vue From CDN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue From CDN</title>
<script src="//unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
@hasinhayder
hasinhayder / qr_code.liquid
Created December 14, 2023 13:50
QR Code Block
{% assign full_url = request.host | append: request.path %}
<div style="position: fixed; bottom: 0; right: 0">
{% comment %} {{ "thumbs-up.png" | asset_url | img_tag }} {% endcomment %}
<img width="150" height="150" src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl={{ full_url }}" alt=""/>
</div>
{% schema %}
{
"name": "App Embed",
"target": "body",
"settings": []
@hasinhayder
hasinhayder / package.json
Last active January 13, 2024 16:31
Shopify App Extension with Local Script
{
"name": "faq-laravel",
"private": true,
"license": "UNLICENSED",
"scripts": {
"shopify": "shopify",
"build": "shopify app build",
"dev": "shopify app dev",
"info": "shopify app info",
"scaffold": "shopify app generate extension",
@hasinhayder
hasinhayder / index.php
Last active November 30, 2023 05:15
mock login
<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET');
header('Access-Control-Allow-Headers: Content-Type, Authorization');
$users = [
[
'email' => '[email protected]',
'name' => 'Admin',
@hasinhayder
hasinhayder / App.vue
Created July 17, 2023 17:24
Hover color change dynamically in Vue.js 3
<script setup>
const themeColor = '#FFA500'
const style = {
color: themeColor
}
const buttonStyle = {
'--button-hover-color': themeColor
}
@hasinhayder
hasinhayder / spotify.md
Created March 17, 2023 11:24
spotify fullscreen fix for linux (ubuntu and others)

Minimally invasive fix without dependencies for simple copy & paste - 2023

Regular installation (RPM / DEB)

  • Close Spotify
  • Run sed -i "/\b\(app.window.position\)\b/d" -- $HOME/.config/spotify/prefs
  • Run Spotify

Flatpak installation

  • Close Spotify
  • Run sed -i "/\b\(app.window.position\)\b/d" -- $HOME/.var/app/com.spotify.Client/config/spotify/prefs
@hasinhayder
hasinhayder / docker-compose.yml
Last active July 3, 2024 19:10
Getting up and running with MariaDB and phpMyAdmin using Docker
version: '3.8'
services:
mariadb:
image: mariadb:10.8
restart: always
ports:
- 3306:3306
volumes:
- ./mariadb:/var/lib/mysql
@hasinhayder
hasinhayder / docker-compose.yml
Created July 10, 2022 12:56
mariadb + adminer
version: '3.8'
services:
mariadb:
image: mariadb:10.8
restart: always
ports:
- 3307:3306
volumes:
- ./mariadb:/var/lib/mysql
@hasinhayder
hasinhayder / docker-compose.yml
Last active July 2, 2022 21:06
mariadb and phpmyadmin docker image
version: '3.1'
services:
mariadb:
image: mariadb:10.8
restart: always
ports:
- 3306:3306
volumes:
- ./mariadb:/var/lib/mysql