Skip to content

Instantly share code, notes, and snippets.

View syntaxlexx's full-sized avatar
🎯
You have to be run by ideas, not by hierarchy!

/SyntaxLexx syntaxlexx

🎯
You have to be run by ideas, not by hierarchy!
View GitHub Profile
@syntaxlexx
syntaxlexx / .aliases
Last active November 16, 2024 12:42
# Universal Shell Aliases, should work with both Bash and ZSH.
alias mkdir='mkdir -p'
alias chown='chown -Rv'
alias chmod='chmod -Rv'
alias grep='grep --color=always'
alias diff='colordiff'
alias tar='tar --verbose'
alias tmux='tmux -2'
#alias rsync='rsync --verbose --progress --stats --compress --recursive --times --perms --links exclude "*bak" --exclude "*~*"'
alias psaux='ps aux'
@syntaxlexx
syntaxlexx / motd
Last active August 17, 2023 07:15
Lexx Motd
.____ _______________ _______ ___
| | \_ _____/\ \/ /\ \/ /
| | | __)_ \ / \ /
| |___ | \ / \ / \
|_______ \/_______ //___/\ \/___/\ \
\/ \/ \_/ \_/
@syntaxlexx
syntaxlexx / apps.domain2.com
Created May 23, 2023 18:54
Appwrite Nginx config with Realtime Enabled
server {
server_name apps.domain2.com;
location / {
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Frame-Options deny;
proxy_pass http://localhost:8080;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
@syntaxlexx
syntaxlexx / $PROFILE
Last active December 23, 2023 18:54
Powershell Windows 10/11 for Devs - Powershell Aliases
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/powerlevel10k_modern.omp.json" | Invoke-Expression
# Make Powershell behave more like ZSH
# You can uncomment this line to view keybindings
# Get-PSReadlineKeyHandler | ? {$_.function -like '*hist*'}
# Documentation
# https://learn.microsoft.com/en-us/powershell/module/psreadline/about/about_psreadline_functions?view=powershell-7.4
Set-PSReadLineKeyHandler -Chord "Tab" -Function AcceptSuggestion
#Set-PSReadLineKeyHandler -Chord "RightArrow" -Function ForwardWord
@syntaxlexx
syntaxlexx / deploy-ci.yml
Last active January 27, 2023 10:10
GitHub Actions - Test & Deploy Laravel Inertia (w/ Vite) to VPS CLoud Server, Notify via Slack
# script to deploy the laravel upstream to the dev server
# required secrets: HOST, USERNAME, PASSWORD, APP_PATH, APPNAME, SLACK_WEBHOOK, SSH_PRIVATE_KEY
# If you are using OpenSSH
# If you are currently using OpenSSH and are getting the following error:
# ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
# Make sure that your key algorithm of choice is supported. On Ubuntu 20.04 or later you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (which is either /etc/ssh/sshd_config or a drop-in file under /etc/ssh/sshd_config.d/):
# CASignatureAlgorithms +ssh-rsa
name: Deploy Laravel App to Production
@syntaxlexx
syntaxlexx / LocalValetDriver.php
Created October 28, 2022 10:40
Serve vanilla PHP projects with Laravel Valet. Extends the ValetDriver. Put in in the root folder of the project.
<?php
class LocalValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@syntaxlexx
syntaxlexx / flutter.code-snippets
Last active August 7, 2023 15:04
VsCode snippets for everyday use
{
"Flutter SizedBox": {
"prefix": "sb",
"scope": "dart,flutter",
"body": [
"const SizedBox(height: $1,),"
],
"description": "Flutter SizedBox"
},
"Flutter Theme colorScheme": {
@syntaxlexx
syntaxlexx / .p10k.zsh
Created July 13, 2022 00:46
OhMyZSH .p10k.zsh
# Generated by Powerlevel10k configuration wizard on 2022-07-10 at 19:17 EAT.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 24045.
# Wizard options: compatible, rainbow, ascii, 1 line, compact, concise,
# transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
#
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
@syntaxlexx
syntaxlexx / Powershell settings.json
Last active February 28, 2023 20:19
VSCode config
{
"workbench.startupEditor": "welcomePageInEmptyWorkbench",
"window.restoreWindows": "none",
"workbench.colorTheme": "Community Material Theme Palenight",
"files.autoSave": "onFocusChange",
"svelte.enable-ts-plugin": true,
"svelte.plugin.svelte.note-new-transformation": false,
"security.workspace.trust.untrustedFiles": "open",
"terminal.integrated.fontFamily": "FiraCode NF",
"editor.fontFamily": "'JetBrains Mono','Fira Code','FiraCode NF',Consolas, 'Courier New', monospace",
@syntaxlexx
syntaxlexx / React Native.code-snippets
Created February 25, 2022 11:39
React Native VSCode Code Snippets
{
"React Native Component": {
"prefix": "rnc",
"body": [
"import React, { useState } from \"react\";",
"import { StyleSheet, View } from \"react-native\";",
"",
"import AppText from \"@/components/AppText\";",
"import defaultStyles from \"@/constants/Styles\";",
"",