Skip to content

Instantly share code, notes, and snippets.

@dimm999
dimm999 / spintax.php
Created January 9, 2019 07:32 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis - https://www.codedevelopr.com/
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*/
class Spintax
{
public function process($text)
@dimm999
dimm999 / pdo.php
Created August 7, 2021 08:11
PHP PDO Connection and query eample
<?php
$host = 'localhost';
$database = 'database';
$user = 'login';
$pass = 'password';
$charset = 'utf8';
$dsn = "mysql:host=$host;dbname=$database;charset=$charset";
$options = [
@dimm999
dimm999 / download-file-axios-nodejs.js
Created October 23, 2021 06:24 — forked from senthilmpro/download-file-axios-nodejs.js
Download File using axios : Node.js program
'use strict'
const Fs = require('fs')
const Path = require('path')
const Axios = require('axios')
async function downloadImage () {
const url = 'https://unsplash.com/photos/AaEQmoufHLk/download?force=true'
const path = Path.resolve(__dirname, 'images', 'code1.jpg')
@dimm999
dimm999 / alacritty.toml
Created April 10, 2025 04:31
Alacrity + WSL config
general.import = [
# uncomment the flavour you want below:
#"~/.config/alacritty/catppuccin-latte.toml"
# "~/.config/alacritty/catppuccin-frappe.toml"
# "~/.config/alacritty/catppuccin-macchiato.toml"
"catppuccin-mocha.toml"
]
[window]
#startup_mode = "Maximized"