Skip to content

Instantly share code, notes, and snippets.

  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
@alexsoar
alexsoar / change-php.sh
Created April 20, 2024 11:32 — forked from mrsuh/change-php.sh
bash scripts
#!/bin/sh
# https://github.com/shivammathur/homebrew-php
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
# https://github.com/Homebrew/brew/issues/14451
export HOMEBREW_NO_INSTALL_FROM_API=1
@shitalmule04
shitalmule04 / MySQL_Export.py
Last active April 20, 2024 11:32
Python Script to export SQLite database tables into CSV file.
import sqlite3 as sql
import os
import csv
from sqlite3 import Error
try:
# Connect to database
conn=sql.connect('mydb.db')
@NSWG
NSWG / VMware Workstation 16 Pro and Player keys
Last active April 20, 2024 11:32
VMware Workstation 16 Pro and Player keys
VMware Workstation Pro 16.x Serials
YA7RA-F6Y46-H889Z-LZMXZ-WF8UA
ZV7HR-4YX17-M80EP-JDMQG-PF0RF
UC3XK-8DD1J-089NP-MYPXT-QGU80
GV100-84W16-M85JP-WXZ7E-ZP2R6
YF5X2-8MW91-4888Y-DNWGC-W68TF
AY1XK-0NG5P-0855Y-K6ZXG-YK0T4
VMware Workstation Player 16.x Serials
@zealot128
zealot128 / simple_form.rb
Created August 13, 2022 14:50
Rails simple_form Tailwind Daisy UI config
# frozen_string_literal: true
#
# Uncomment this and change the path if necessary to include your own
# components.
# See https://github.com/heartcombo/simple_form#custom-components to know
# more about custom components.
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
#
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
@vratiu
vratiu / .bash_aliases
Last active April 20, 2024 11:24
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@mattetti
mattetti / newWindowsMachine.sh
Last active April 20, 2024 11:21
bash script to run from WSL to setup Windows and Linux from the linux side. To run: `wget https://gist.githubusercontent.com/mattetti/9807e2a1e654a7c00bb9c13f340fc39f/raw/ -O newMachineSetup.sh` and then `bash newMachineSetup.sh`
#!/bin/bash
export WINHOME=$(wslpath "$(wslvar USERPROFILE)")
# github username is needed to pull down the dot files
export GITHUBUSERNAME="mattetti"
# wininstall does an install using winget and checks that it went well
function wininstall {
echo "Installing $1";
cmd.exe /C winget.exe install -e $1;

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

Более удобной и актуальной версией является эта статья с использованием traefik

https://gist.github.com/dancheskus/365e9bc49a73908302af19882a86ce52


Certbot и nginx, как обратный прокси в Docker (пример с 2 react проектами)

В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам

@karlhillx
karlhillx / macos_big_sur_homebrew_apache_php_mariadb_2020.md
Last active April 20, 2024 11:15
macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB (Regularly updated)

macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB

This document helps get your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, and MariaDB.