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
@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' => 'admin@doe.com',
'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
Created July 10, 2022 16:44
Getting up and running with MariaDB and phpMyAdmin using Docker
version: '3.8'
services:
mariadb:
image: mariadb:10.8
restart: always
ports:
- 3307: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
@hasinhayder
hasinhayder / all-packages-restore.md
Created February 12, 2022 09:44
Package Copy & Restore

https://askubuntu.com/posts/9889/edit

How to keep a list of all packages and restore using dpkg

  1. It'd be a good idea to just copy all of /home as that contains your documents and preferences. If you just want to know where preferences are stored, it varies. Many applications store them in .config (that's /home/username/.config) and .local. Most user preferences will be in .gconf. Some older applications might save settings in .gnome2. Firefox uses .mozilla; other browsers use .config as far as I know. To be safe, I'd just recommend backing up /home still.

  2. Run dpkg --get-selections &gt; ~/my-packages.txt to build up a list of everything installed (or removed) on your system. It will be saved in your home folder as my-packages.txt. Once you reinstall, run sudo dpkg --set-selections &lt; ~/my-packages.txt (assuming the file is placed in the same location again) and then sudo apt-get -u dselect-upgrade to start installing packages. You'll want to also back up /etc/apt/ and restore it