Skip to content

Instantly share code, notes, and snippets.

View josecanhelp's full-sized avatar

Jose Soto josecanhelp

View GitHub Profile

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get a single character ${VARNAME[index]}
Get the string from a specific index ${VARNAME[index,-1]}
@josecanhelp
josecanhelp / meilisearch-forge.md
Last active September 5, 2024 12:06
Install MeiliSearch on Forge servers

Although MeiliSearch offers steps to install via apt, there are some dependency libraries that are not installable on the server architecture we have availble on our Tighten Forge servers. However, the servers can run the program just fine with the binary. Here are the steps I took to make it work.

Download the stable release

curl -L https://install.meilisearch.com | sh

Change the ownership and modify permissions

chmod 755 meilisearch chown root:root meilisearch

Move the binary to a system-wide available path

#!/usr/bin/env python3
#
# by Siddharth Dushantha (sdushantha)
#
# My very simple version of youtube-dl.
#
# Credits: https://git.io/JTPr9
#
import re
@josecanhelp
josecanhelp / notes.sh
Created June 28, 2020 08:59
Install Xdebug Video Notes
brew install php@7.4
brew doctor
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
pecl install xdebug
php -v
@josecanhelp
josecanhelp / cartesian_grouping.php
Created December 13, 2019 16:05
Cartesian Grouping
<?php
function inject($elem, $array)
{
return array_map(function ($n) use ($elem) {
return array_merge((array) $elem, (array) $n);
}, $array);
}
function zip($array1, $array2)
<?php
require __DIR__.'/vendor/autoload.php';
use Vector\Lib\Arrays;
use Vector\Lib\Math;
use Vector\Lib\Lambda;
use Vector\Core\Module;
$input = [148454, 118001, 98851.....];
@josecanhelp
josecanhelp / webpack.mix.js
Created May 17, 2018 16:50
JoseSoto.com Mix-Webpack Config
let mix = require('laravel-mix');
let build = require('./tasks/build.js');
let tailwindcss = require('tailwindcss');
let glob = require("glob-all");
let PurgecssPlugin = require("purgecss-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const imageminMozjpeg = require('imagemin-mozjpeg');
class TailwindExtractor {
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Finder\Finder;
class DuskunitCommand extends Command
{
protected $signature = 'duskunit {--down}';
@josecanhelp
josecanhelp / tmux-cheatsheet.markdown
Created December 12, 2015 20:14 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname