Skip to content

Instantly share code, notes, and snippets.

@riipandi
Last active January 1, 2024 07:29
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save riipandi/2f304a1cbf7615a8f912473b5f4a7cc3 to your computer and use it in GitHub Desktop.
Save riipandi/2f304a1cbf7615a8f912473b5f4a7cc3 to your computer and use it in GitHub Desktop.
Personal Development Environment Setup

Personal Development Environment Setup

Don't forget to add %LOCALAPPDATA%\Yarn\bin to your PATH if you are using Yarn instead NPM. Windows Defender exclude: %HOMEPATH%\.Rider2019.2 and %HOMEPATH%\.nuget

Get installed VSCode extensions

  • UNIX : code --list-extensions | xargs -L 1 echo code --install-extension > vscode-extensions.txt
  • Windows : code --list-extensions | % { "code --install-extension $_" }
# Global Composer packages
composer global require squizlabs/php_codesniffer

# Essentials
# code --install-extension riipandi.vscode-focuz-theme
# code --install-extension riipandi.vscode-atomizer-theme
# code --install-extension aaronpowell.vscode-profile-switcher
code --install-extension EverlastEngineering.debug-in-titlebar
code --install-extension github.github-vscode-theme
code --install-extension Equinusocio.moxer-icons
code --install-extension ElAnandKumar.el-vsc-product-icon-theme
code --install-extension EditorConfig.EditorConfig
code --install-extension rafamel.subtle-brackets
code --install-extension BriteSnow.vscode-toggle-quotes
code --install-extension wwm.better-align
code --install-extension vincaslt.highlight-matching-tag
code --install-extension esbenp.prettier-vscode
code --install-extension willmendesneto.vscode-file-extra
code --install-extension bierner.markdown-preview-github-styles
code --install-extension eamodio.gitlens
code --install-extension neptunedesign.vs-slug
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-azuretools.vscode-docker
code --install-extension gruntfuggly.todo-tree
code --install-extension adpyke.codesnap
code --install-extension mikestead.dotenv
code --install-extension johnpapa.vscode-cloak
code --install-extension pflannery.vscode-versionlens
code --install-extension coolbear.systemd-unit-file
code --install-extension mrmlnc.vscode-apache
code --install-extension ahmadalli.vscode-nginx-conf
code --install-extension plibither8.remove-comments
code --install-extension philsinatra.nested-comments
code --install-extension aaron-bond.better-comments
code --install-extension jpoissonnier.vscode-styled-components
code --install-extension kenhowardpdx.vscode-gist
code --install-extension analytic-signal.snippets-geojson
code --install-extension funkyremi.vscode-google-translate
code --install-extension af4jm.vscode-m3u
code --install-extension mkxml.vscode-filesize
code --install-extension dotjoshjohnson.xml
code --install-extension adamhartford.vscode-base64
code --install-extension rangav.vscode-thunder-client
code --install-extension emilast.logfilehighlighter

# JavaScript Development
code --install-extension bradlc.vscode-tailwindcss
code --install-extension csstools.postcss
code --install-extension bourhaouta.tailwindshades
code --install-extension heybourn.headwind
code --install-extension christian-kohler.npm-intellisense
code --install-extension ms-vscode-remote.remote-containers
code --install-extension github.vscode-pull-request-github
code --install-extension github.remotehub
code --install-extension wix.vscode-import-cost
code --install-extension xabikos.javascriptsnippets
code --install-extension dbaeumer.vscode-eslint
code --install-extension stylelint.vscode-stylelint
code --install-extension mgmcdermott.vscode-language-babel
code --install-extension angryobject.react-pure-to-class-vscode
code --install-extension riazxrazor.html-to-jsx
code --install-extension walter-ribeiro.full-react-snippets
code --install-extension earthly.earthfile-syntax-highlighting
code --install-extension sburg.vscode-javascript-booster
code --install-extension prisma.prisma
code --install-extension wix.glean
code --install-extension octref.vetur

# PHP Laravel
code --install-extension valeryanm.vscode-phpsab
code --install-extension onecentlin.laravel-blade
code --install-extension austenc.laravel-blade-spacer
code --install-extension shufo.vscode-blade-formatter
code --install-extension marabesi.php-import-checker
code --install-extension calebporzio.better-phpunit
code --install-extension MehediDracula.php-namespace-resolver
code --install-extension ahinkle.laravel-model-snippets
code --install-extension onecentlin.laravel5-snippets
code --install-extension amiralizadeh9480.laravel-extra-intellisense
code --install-extension adrianwilczynski.alpine-js-intellisense

# Java Development
code --install-extension redhat.java
code --install-extension vscjava.vscode-java-test
code --install-extension vscjava.vscode-java-dependency
code --install-extension vscjava.vscode-maven
code --install-extension vscjava.vscode-java-debug

# Flutter Development
code --install-extension Dart-Code.flutter
code --install-extension mathiasfrohlich.Kotlin

# Windows Only
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension idleberg.innosetup
code --install-extension alefragnani.pascal
code --install-extension alefragnani.pascal-formatter
# Configuration for Alacritty, the GPU enhanced terminal emulator.
#
# Inspired from:
# - https://arslan.io/2018/02/05/gpu-accelerated-terminal-alacritty/#make-alacritty-feel-like-iterm2
#
# Import additional configuration files
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
# import:
# - ~/.config/alacritty/colors.yml
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
TERM: xterm-256color
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. The number of columns
# must be at least `2`, while using a value of `0` for columns and lines will
# fall back to the window manager's recommended size.
dimensions:
columns: 77
lines: 20
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 0
y: 0
# Spread additional padding evenly around the terminal content.
dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons
decorations: full
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
startup_mode: Windowed
title: Terminal
dynamic_title: false
scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
history: 10000
# Scrolling distance multiplier.
multiplier: 3
# Font configuration
font:
normal:
family: Jetbrains Mono NL
style: Thin
# Bold font face
bold:
family: Jetbrains Mono NL
style: Regular
# Italic font face
italic:
family: Jetbrains Mono NL
style: Thin Italic
# Bold italic font face
bold_italic:
family: Jetbrains Mono NL
style: Regular Italic
# Point size
size: 15
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing.
offset:
x: 1
y: 2
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward.
glyph_offset:
x: 0
y: 0
# Thin stroke font rendering (macOS only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`.
use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
draw_bold_text_with_bright_colors: false
# ------------ [COLORS SCHEMAS] -------------------------------------------------
schemes:
focuz_light: &focuz_light
# Default colors
primary:
background: '0xf9f5d7' # hard contrast
# background: '0xfbf1c7' # normal
foreground: '0x3c3836'
# Normal colors
normal:
black: '0xfbf1c7'
red: '0xcc241d'
green: '0x98971a'
yellow: '0xd79921'
blue: '0x458588'
magenta: '0xb16286'
cyan: '0x689d6a'
white: '0x7c6f64'
# Bright colors
bright:
black: '0x928374'
red: '0x9d0006'
green: '0x79740e'
yellow: '0xb57614'
blue: '0x076678'
magenta: '0x8f3f71'
cyan: '0x427b58'
white: '0x3c3836'
focuz_dark: &focuz_dark
# Default colors
primary:
background: '0x1d2021' # hard contrast
# background: '0x282828' # normal contrast
foreground: '0xebdbb2'
# Normal colors
normal:
black: '0x282828'
red: '0xcc241d'
green: '0x98971a'
yellow: '0xd79921'
blue: '0x458588'
magenta: '0xb16286'
cyan: '0x689d6a'
white: '0xa89984'
# Bright colors
bright:
black: '0x928374'
red: '0xfb4934'
green: '0xb8bb26'
yellow: '0xfabd2f'
blue: '0x83a598'
magenta: '0xd3869b'
cyan: '0x8ec07c'
white: '0xebdbb2'
colors: *focuz_dark
# ------------ [COLORS SCHEMAS] -------------------------------------------------
# Bell
#
# The bell is rung every time the BEL control character is received.
bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
animation: EaseOutExpo
duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 0.88
selection:
# This string contains all characters that are used as separators for
# "semantic words" in Alacritty.
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
# When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: true
cursor:
# Cursor style
style:
# Values for `shape`:
# - ▇ Block
# - _ Underline
# - | Beam
shape: Underline
# Cursor blinking state
# - Never: Prevent the cursor from ever blinking
# - Off: Disable blinking by default
# - On: Enable blinking by default
# - Always: Force the cursor to always blink
blinking: On
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# Cursor blinking interval in milliseconds.
#blink_interval: 750
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
unfocused_hollow: false
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
live_config_reload: true
# Default Shell:
# - (macOS) /bin/bash --login
# - (Windows) powershell
# shell:
# program: /bin/zsh
# args:
# - --login
shell:
program: /usr/local/bin/tmux
args:
- new-session
- -A
- -D
- -s
- Terminal
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
working_directory: None
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: true
# Regex hints
#
# Terminal hints can be used to find text in the visible part of the terminal
# and pipe it to other applications.
#hints:
# Keys used for the hint labels.
#alphabet: "jfkdls;ahgurieowpq"
# List with all available hints
#
# Each hint must have a `regex` and either an `action` or a `command` field.
# The fields `mouse`, `binding` and `post_processing` are optional.
#
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
#
# The `mouse.enabled` field controls if the hint should be underlined while
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
#
# If the `post_processing` field is set to `true`, heuristics will be used to
# shorten the match if there are characters likely not to be part of the hint
# (e.g. a trailing `.`). This is most useful for URIs.
#
# Values for `action`:
# - Copy
# Copy the hint's text to the clipboard.
# - Paste
# Paste the hint's text to the terminal or search.
# - Select
# Select the hint's text.
# - MoveViModeCursor
# Move the vi mode cursor to the beginning of the hint.
#enabled:
# - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
# [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
# command: xdg-open
# post_processing: true
# mouse:
# enabled: true
# mods: None
# binding:
# key: U
# mods: Control|Shift
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty
# captures the mouse, the `Shift` modifier is automatically added as a
# requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings for actions not exclusive to mouse mode)
#
# - Mouse exclusive actions:
#
# - ExpandSelection
# Expand the selection to the current mouse cursor location.
#
# And optionally:
#
# - `mods` (see key bindings)
mouse_bindings:
# - { mouse: Right, action: ExpandSelection }
- { mouse: Middle, mode: ~Vi, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# Start searching toward the right of the search origin.
# - SearchBackward
# Start searching toward the left of the search origin.
# - Copy
# - Paste
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# Remove the terminal's scrollback history.
# - Hide
# Hide the Alacritty window.
# - Minimize
# Minimize the Alacritty window.
# - Quit
# Quit Alacritty.
# - ToggleFullscreen
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - ClearLogNotice
# Clear Alacritty's UI warning and error notice.
# - ClearSelection
# Remove the active selection.
# - ReceiveChar
# - None
#
# - Vi mode exclusive actions:
#
# - Open
# Perform the action of the first matching hint under the vi mode cursor
# with `mouse.enabled` set to `true`.
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# Toggle semantic selection based on `selection.semantic_escape_chars`.
#
# - Vi mode exclusive cursor motion actions:
#
# - Up
# One line up.
# - Down
# One line down.
# - Left
# One character left.
# - Right
# One character right.
# - First
# First column, or beginning of the line when already at the first column.
# - Last
# Last column, or beginning of the line when already at the last column.
# - FirstOccupied
# First non-empty cell in this terminal row, or first non-empty cell of
# the line when already at the first cell of the row.
# - High
# Top of the screen.
# - Middle
# Center of the screen.
# - Low
# Bottom of the screen.
# - SemanticLeft
# Start of the previous semantically separated word.
# - SemanticRight
# Start of the next semantically separated word.
# - SemanticLeftEnd
# End of the previous semantically separated word.
# - SemanticRightEnd
# End of the next semantically separated word.
# - WordLeft
# Start of the previous whitespace separated word.
# - WordRight
# Start of the next whitespace separated word.
# - WordLeftEnd
# End of the previous whitespace separated word.
# - WordRightEnd
# End of the next whitespace separated word.
# - Bracket
# Character matching the bracket at the cursor's location.
# - SearchNext
# Beginning of the next match.
# - SearchPrevious
# Beginning of the previous match.
# - SearchStart
# Start of the match to the left of the vi mode cursor.
# - SearchEnd
# End of the match to the right of the vi mode cursor.
#
# - Search mode exclusive actions:
# - SearchFocusNext
# Move the focus to the next search match.
# - SearchFocusPrevious
# Move the focus to the previous search match.
# - SearchConfirm
# - SearchCancel
# - SearchClear
# Reset the search regex.
# - SearchDeleteWord
# Delete the last word in the search regex.
# - SearchHistoryPrevious
# Go to the previous regex in the search history.
# - SearchHistoryNext
# Go to the next regex in the search history.
#
# - macOS exclusive actions:
# - ToggleSimpleFullscreen
# Enter fullscreen without occupying another space.
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Search
# - Alt
# - Vi
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
key_bindings:
- { key: Paste, action: Paste }
- { key: Copy, action: Copy }
- { key: D, mods: Command, chars: "\x06\x76" }
- { key: D, mods: Command|Shift, chars: "\x06\x73" }
- { key: W, mods: Command, chars: "\x06\x78" }
- { key: H, mods: Command, chars: "\x06\x68" }
- { key: J, mods: Command, chars: "\x06\x6a" }
- { key: K, mods: Command, chars: "\x06\x6b" }
- { key: L, mods: Command, chars: "\x06\x6c" }
- { key: T, mods: Command, chars: "\x06\x63" }
- { key: Key1, mods: Command, chars: "\x06\x31" }
- { key: Key2, mods: Command, chars: "\x06\x32" }
- { key: Key3, mods: Command, chars: "\x06\x33" }
- { key: Key4, mods: Command, chars: "\x06\x34" }
- { key: Key5, mods: Command, chars: "\x06\x35" }
- { key: Key6, mods: Command, chars: "\x06\x36" }
- { key: Key7, mods: Command, chars: "\x06\x37" }
- { key: Key8, mods: Command, chars: "\x06\x38" }
- { key: Key9, mods: Command, chars: "\x06\x39" }
- { key: Left, mods: Command, chars: "\x06\x48" }
- { key: Down, mods: Command, chars: "\x06\x4a" }
- { key: Up, mods: Command, chars: "\x06\x4b" }
- { key: Right, mods: Command, chars: "\x06\x4c" }
- { key: Return, mods: Command, action: ToggleSimpleFullscreen }
- { key: Return, mods: Command|Shift, action: ToggleViMode }
- { key: Left, mods: Alt, chars: "\x1bb" }
- { key: Right, mods: Alt, chars: "\x1bf" }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi|~Search, action: Copy }
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi|~Search, action: Open }
#- { key: K, mode: Vi|~Search, action: Up }
#- { key: J, mode: Vi|~Search, action: Down }
#- { key: H, mode: Vi|~Search, action: Left }
#- { key: L, mode: Vi|~Search, action: Right }
#- { key: Up, mode: Vi|~Search, action: Up }
#- { key: Down, mode: Vi|~Search, action: Down }
#- { key: Left, mode: Vi|~Search, action: Left }
#- { key: Right, mode: Vi|~Search, action: Right }
#- { key: Key0, mode: Vi|~Search, action: First }
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
#- { key: W, mode: Vi|~Search, action: SemanticRight }
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
#- { key: N, mode: Vi|~Search, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
# Search Mode
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
#- { key: Escape, mode: Search, action: SearchCancel }
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
#- { key: U, mods: Control, mode: Search, action: SearchClear }
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
#- { key: Down, mode: Search, action: SearchHistoryNext }
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Plus, mods: Command, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: SpawnNewInstance }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
# Display the time it takes to redraw each frame.
# Keep the log file after quitting Alacritty.
#
# Values for `log_level`:
# - Off
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#
# Print all received window events.
debug:
render_timer: false
persistent_logging: false
log_level: Error
print_events: false
# Aliases for brew
alias b='brew'
alias bi='brew install'
alias bcl='brew cask list'
alias bci='brew cask install'
alias bcu='brew cask uninstall'
alias bcn='brew cask info'
alias svcrun='brew services run'
alias svcstop='brew services stop'
alias svclist='brew services list'
alias svcstart='brew services start'
alias svcrestart='brew services restart'
# Environment aliases
alias edit-rc='code ~/.zshrc'
alias edit-aliases='code ~/.aliases'
alias edit-functions='code ~/.functions'
alias update='source ~/.zshrc'
alias cw='cd ~/Workspace'
alias cs='cd ~/Sandbox'
# Aliases for Java development
alias setglobaljava-8='jenv global 1.8 && jenv shell 1.8 && update'
alias setglobaljava-11='jenv global 11.0 && jenv shell 11.0 && update'
alias setlocaljava-8='jenv local 1.8 && update'
alias setlocaljava-11='jenv local 11.0 && update'
# Sonar Code Quality Testing
# ls -tr /usr/local/Cellar/sonarqube | sort | tail -1
export SONAR_SCANNER_OPTS="-Xmx512m"
export SONAR_TELEMETRY_ENABLE=false
export SONAR_PATH_LOGS=/usr/local/var/log
export SONAR_JDBC_URL=jdbc:postgresql://localhost:5432/sonarqube?currentSchema=public
export SONAR_JDBC_USERNAME=postgres
export SONAR_JDBC_PASSWORD=secret
export SONAR_WEB_HOST=127.0.0.1
export SONAR_WEB_PORT=8890
alias scan-with-sonar="sonar-scanner -Dproject.settings=./sonar-project.properties"
# Flutter development:
if [ -f "${HOME}/Library/Android/sdk" ]; then
export STUDIO_JDK=$JAVA_HOME_8
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_BT_VERSION="$(ls -tr $ANDROID_HOME/build-tools | sort | tail -1)"
export PATH="$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
export PATH="$ANDROID_HOME/build-tools/$ANDROID_BT_VERSION:$PATH"
export PATH="$ANDROID_HOME/ndk-bundle:$PATH"
export PATH="/usr/local/share/flutter/bin:$PATH"
fi
# Disable dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_HOME="/usr/local/share/dotnet"
export PATH="$DOTNET_HOME/bin:$PATH"
# Golang development:
export GOPATH="$HOME/Goject"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
# PHP + NodeJS development
export GATSBY_TELEMETRY_DISABLED=1
export PATH="$HOME/.composer/vendor/bin:$PATH"
# Suppress or quieten NPM messages
# "silent", "error", "warn", "http", "info", "verbose", "silly"
export NPM_CONFIG_LOGLEVEL=error
# Python3 from brew
# export PATH="$(brew --prefix python3)/libexec:$PATH"
# PIPENV_IGNORE_VIRTUALENVS=1
# PIPENV_VERBOSITY=-1
# Python pake pyenv
# https://medium.com/faun/pyenv-multi-version-python-development-on-mac-578736fb91aa
# eval "$(pyenv init -)"
# alias setglobal-python2='pyenv global 2.7.16 && update'
# alias setglobal-python3='pyenv global 3.7.7 && update'
# alias setlocal-python2='pyenv local 2.7.16 && update'
# alias setlocal-python3='pyenv local 3.7.7 && update'
#---------------------------------------------------------------------------------------
# Aliases for Git
#---------------------------------------------------------------------------------------
alias gc="git clone"
alias gcm="git commit -m"
alias gco="git checkout"
alias grv='git remote -v'
alias gba="git branch -a"
alias gwait="git reset HEAD"
alias gundo="git reset --soft HEAD^"
alias grs="git clean -f && git reset --hard HEAD" # Removes all changes, even untracked files
alias gpr='git reset --hard HEAD && git pull'
alias gl="git log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias glb='git log --oneline --decorate --graph --all'
alias gitstat='git status'
alias gpl="git pull --rebase"
alias gpsf="git push --force-with-lease"
alias grb="git rebase"
alias grbi='git rebase -i'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
# Remove local branches that have already been merged in the remote repository
alias gcmb="git branch --merged | grep -Ev '(^\*|master)' | xargs git branch -d"
# Sets the upstream branch to be the same branch as the locally named branch
alias gset='git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`'
# Do an interactive rebase back N number of commits (e.g. grn 3)
grn() { git rebase -i HEAD~"$1"; }
# Do an interactive rebase to a supplied commit hash (e.g. grbc 80e1625)
grbic() { git rebase -i "$1"; }
# Pull / sync with original upstrean
alias gpu='git fetch upstream && git checkout master && git rebase upstream/master'
alias gpo="git push origin"
alias gm="git merge"
alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
#---------------------------------------------------------------------------------------
# Laravel artisan command
#---------------------------------------------------------------------------------------
alias pa='php artisan'
alias pati='php artisan tinker'
alias pakeygen='php artisan key:generate'
alias pami='php artisan migrate'
alias pami-fresh='php artisan migrate:fresh'
alias mfs='php artisan migrate:fresh --seed'
alias pami-rollback='php artisan migrate:rollback'
alias paseed='php artisan db:seed'
alias paslink='php artisan storage:link'
# paseed --class=DummyContentSeeder
alias to='takeout'
# Jetbrains IntellijIDEA and phpStorm
# alias phpstorm='open -a /Applications/PhpStorm.app "`pwd`"'
alias idea='open -a "`ls -dt ~/Library/Application\ Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/20*/IntelliJ\ IDEA.app|head -1`" "`pwd`"'
alias pf="phpunit --filter "
alias phpunit="vendor/bin/phpunit"
alias phpunitw="phpunit-watcher watch"
#---------------------------------------------------------------------------------------
# General Aliases
#---------------------------------------------------------------------------------------
alias x='exit'
alias c.='code .'
alias f='open -a Finder ./'
alias iphone='open -a Simulator'
alias mp='multipass'
alias cl='history -c && clear'
alias cls='local HISTSIZE=0 && history -c && clear'
alias setdns-auto='networksetup -setdnsservers Wi-Fi Empty'
alias setdns-crypted='networksetup -setdnsservers Wi-Fi 127.0.0.1'
alias getdns='networksetup -getdnsservers Wi-Fi'
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# IP addresses
alias myip="curl https://diagnostic.opendns.com/myip ; echo"
alias localip="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
# Flush Directory Service cache
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple’s System Logs to improve shell startup speed
alias cleantrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
# Composer
alias c='composer'
alias cu='composer update --no-suggest'
alias cr='composer require'
alias crm='composer remove'
alias cdu='composer dump-autoload'
alias cgu='composer global update'
alias ccp='composer create-project --prefer-dist'
alias compi='composer install --no-suggest'
alias ccc='composer clearcache'
alias npmi='npm install --no-optional --no-audit'
alias npmu='npm upgrade && npm install'
alias npmR='npm run'
alias sshconfig="vi ~/.ssh/config"
alias rkh='rm -f ~/.ssh/known_hosts'
alias vls='valet link && valet secure'
alias vlf='valet forget && valet unsecure'
alias ymp4='youtube-dl -f best'
alias ymp3='youtube-dl --extract-audio --audio-format mp3'
alias pgx='PGPASSWORD=secret psql -h 127.0.0.1 -U postgres postgres'
alias myx='mysql -h 127.0.0.1 -P 3306 -uroot -psecret'
alias psx='mysql -h 127.0.0.1 -P 3308 -uroot -psecret'
alias gw='./gradlew'
alias mw='./mvnw'
# rsync -av -P <source> <host>:~/
alias sendfile="rsync -av -P"
# Network status
alias lsport='sudo lsof -iTCP -sTCP:LISTEN -P -n'
alias lstcp='netstat -p tcp -an | grep LISTEN'
alias lsudp='netstat -p udp -an | grep LISTEN'
# Docker command alias
alias dk='docker'
alias dk-stop='docker stop'
alias dk-stop='docker stop --time=20'
alias dkls='docker image list'
alias dri='docker run --rm --interactive'
alias dkprune='docker image prune -a && docker system prune --volumes'
alias dkps='docker ps --format "table{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"'
alias dkstartall='docker start $(docker ps -aq) && dkps -a'
alias dkstopall='docker stop $(docker ps -aq) && dkps -a'
alias dkrmall='docker rm $(docker ps -aq) && dkps -a'
alias dkpsa='dkps -a'
#---------------------------------------------------------------------------------------
# Aliasses for Docker
#---------------------------------------------------------------------------------------
alias dkc='docker-compose'
alias dcr='docker-compose run --rm'
alias dkrun-pgsql12='docker run --name pgsql12 -e POSTGRES_PASSWORD=secret -dp 127.0.0.1:5432:5432 postgres:12-alpine'
alias dkrun-mariadb='docker run --name mariadb -e MYSQL_ROOT_PASSWORD=secret -dp 127.0.0.1:3306:3306 mariadb:10.4-bionic'
alias dkrun-percona='docker run --name percona -e MYSQL_ROOT_PASSWORD=secret -dp 127.0.0.1:3308:3308 percona:8-centos'
alias dkrun-redis60='docker run --name redis60 -dp 127.0.0.1:6379:6379 redis:6-alpine redis-server --appendonly yes'
alias dkrun-redis50='docker run --name redis50 -dp 127.0.0.1:6378:6378 redis:5-alpine redis-server --appendonly yes'
#---------------------------------------------------------------------------------------
# Git command and aliases
#---------------------------------------------------------------------------------------
# Scan Ports
function scanport() {
sudo nmap -sS -sU -T4 -A -v "$1"
}
# Git add commit
function gac() {
git add --all .
git commit -m $1
}
# Snapcraft release
function gsr() {
git tag -d $1
git push --delete origin $1
git tag -a $1 -m "Create release $1"
git push origin $1
goreleaser --rm-dist
}
function randombase64() {
if [ -z "$1" ]; then
openssl rand -base64 32
else
openssl rand -base64 $1
fi
}
function randomstr() {
if [ -z "$1" ]; then
openssl rand -hex 4
else
openssl rand -base64 500 | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1
fi
}
function uuid-uppercase() { uuidgen }
function uuid-lowercase() { uuidgen | tr "[A-Z]" "[a-z]" }
function convert-to-mp4() {
ffmpeg -i $1 -vcodec h264 -acodec mp2 "${1:r}.mp4"
}
function dkstop() {
container_name=$1
docker container stop $(docker container ls -q --filter name=${container_name})
docker ps -a --format "table{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
}
function dkstart() {
container_name=$1
docker start $(docker container ls -aq --filter name=${container_name})
docker ps --format "table{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
}
function dkrm() {
container_name=$1
docker rm $(docker container ls -aq --filter name=${container_name})
docker ps -a --format "table{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
}
# Global gitignore: ~/.gitignore
# ------------------------------
# Common ignored files
# ------------------------------
/ /
._*
.cache/
.DS_Store
.DS_Store?
.eslintcache
.env
.env.production
.env.staging
.env.testing
.grunt
.idea
.java-version
.lock-wscript
.node_repl_history
.npm
.nyc_output
.pnp.js
.pnp/
.Spotlight-V100
.Trashes
.yarn-integrity
*.log
*.out
*.pid
*.pid.lock
*.pyc
*.seed
*.tgz
bower_components
build/Release
conf/application.conf
coverage
Desktop.ini
jspm_packages/
lib-cov
node_modules/
npm-debug.log*
pids
Thumbs.db
typings/
venv/
yarn-debug.log*
yarn-error.log
yarn-error.log*
#------------------------------------------------
# ZSH look and feel
#------------------------------------------------
export LANG=en_US.UTF-8
export ZSH=$HOME/.oh-my-zsh
# mkdir -p $ZSH_CUSTOM/themes
# curl -sL https://git.io/JtXrn -o $ZSH_CUSTOM/themes/pi.zsh-theme
# brew install zsh-autosuggestions
# git config --global --add oh-my-zsh.hide-dirty 1
# git config --global oh-my-zsh.hide-info 1
# bira / crunch / gallifrey / jnrowe
ZSH_THEME="pi"
CASE_SENSITIVE="true"
HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="true"
DISABLE_UPDATE_PROMPT="false"
DISABLE_AUTO_TITLE="false"
ENABLE_CORRECTION="false"
COMPLETION_WAITING_DOTS="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
ZSH_DISABLE_COMPFIX="true"
plugins=(adb flutter gradle mvn nmap spring xcode)
if [ -f '/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh' ]; then
. '/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh'
fi
source $ZSH/oh-my-zsh.sh
#------------------------------------------------
# User configuration
#------------------------------------------------
# Specify VS Code as default editor
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nano'
export REACT_EDITOR='nano'
else
export EDITOR='code'
export REACT_EDITOR='code'
fi
# Homebrew fix pkg installed @sbin
export PATH="/usr/local/sbin:$PATH"
# Homebrew configuration and aliases
export HOMEBREW_NO_ANALYTICS=1
# Java development environment:
export JAVA_HOME_8=$(/usr/libexec/java_home -v1.8)
export JAVA_HOME_11=$(/usr/libexec/java_home -v11)
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
# Golang development:
# mkdir -p $GOPATH $GOPATH/src $GOPATH/pkg $GOPATH/bin
# go get -v github.com/stamblerre/gocode
# go get -v github.com/uudashr/gopkgs/v2/cmd/gopkgs
# go get -v golang.org/x/tools/cmd/goimports
# -----------------------------------------------------
# go get -u github.com/gofiber/fiber/v2
# go get -u github.com/revel/cmd/revel
#export GOPATH=$HOME/Go
#export GOROOT=$(brew --prefix golang)/libexec
#export PATH=$PATH:${GOPATH}/bin:${GOROOT}/bin
#export GO111MODULE=on
# PHP + NodeJS development
export GATSBY_TELEMETRY_DISABLED=1
export PATH="$HOME/.composer/vendor/bin:$PATH"
COMPOSER_MEMORY_LIMIT=-1
# Suppress or quieten NPM messages
# "silent", "error", "warn", "http", "info", "verbose", "silly"
export NPM_CONFIG_LOGLEVEL=error
# Python3 from brew
# export PATH="$(brew --prefix python3)/libexec/bin:$PATH"
# export PATH="$HOME/.poetry/bin:$PATH"
# PIPENV_IGNORE_VIRTUALENVS=1
# PIPENV_VERBOSITY=-1
# MySQL and PgSQL client tools
# export PATH="/usr/local/opt/mysql-client/bin:/usr/local/opt/libpq/bin:$PATH"
# Android SDK
# export PATH="$HOME/Android/platform-tools:$PATH"
# Google Cloud SDK and shell command completion for gcloud:
# /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk
# /usr/local/share/google-cloud-sdk
if [ -f '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc' ]; then
. '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'
fi
if [ -f '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc' ]; then
. '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'
fi
# Other environment settings
source $HOME/.functions
source $HOME/.aliases
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.sonarqube</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/sonarqube/bin/sonar</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>SONAR_SCANNER_OPTS</key>
<string>-Xmx512m</string>
<key>SONAR_JDBC_URL</key>
<string>jdbc:postgresql://localhost:5432/sonarqube?currentSchema=public</string>
<key>SONAR_JDBC_USERNAME</key>
<string>postgres</string>
<key>SONAR_JDBC_PASSWORD</key>
<string>secret</string>
<key>SONAR_WEB_HOST</key>
<string>127.0.0.1</string>
<key>SONAR_WEB_PORT</key>
<string>8890</string>
<key>SONAR_PATH_LOGS</key>
<string>/usr/local/var/log</string>
<key>SONAR_TELEMETRY_ENABLE</key>
<false/>
</dict>
</dict>
</plist>
module.exports = {
config: {
updateChannel: "stable",
opacity: 0.98,
fontSize: 13,
fontFamily: '"Cascadia Mono", "Jetbrains Mono", "Monaco", "Roboto Mono", "Consolas"',
fontWeight: "normal",
fontWeightBold: "normal",
cursorColor: "rgba(248,28,229,0.8)",
cursorAccentColor: "#000000",
cursorShape: "BLOCK",
cursorBlink: true,
foregroundColor: "rgba(141, 208, 6, 0.93)",
backgroundColor: "rgba(0, 0, 0, 0.65)",
selectionColor: "rgba(255, 255, 255,0.3)",
borderColor: "rgba(255, 255, 255, .15)",
css: "",
termCSS: "",
showHamburgerMenu: true,
showWindowControls: "",
windowSize: [970, 690],
padding: "12px 10px",
bell: false,
copyOnSelect: false,
defaultSSHApp: false,
webGLRenderer: false,
// shell: 'C:\\Program Files\\PowerShell\\7\\pwsh.exe',
// shellArgs: ['-NoLogo', '-WorkingDirectory', 'D:\\Sandbox'],
// shell: 'C:\\Windows\\System32\\cmd.exe',
// shellArgs: ['--login', '-i', '/c ubuntu1804'],
shell: '/bin/zsh',
shellArgs: ['--login'],
hyperBorder: {
borderColors: ["#FF2C70", "#6937FF"],
borderWidth: "1px",
borderRadiusInner: "4px",
borderRadiusOuter: "4px",
},
},
plugins: [
"hyper-electron-highlighter",
"hyper-font-ligatures"
"hyper-single-instance",
"hyper-font-smoothing",
"hyper-broadcast",
"hyper-opacity",
"hyperborder",
],
}
# Promp text information
PROMPT='%{$fg_bold[cyan]%}%c$(git_prompt_info)%{$reset_color%}$(_git_branch_status)$(git_prompt_status)${_return_status} ➜ '
local _return_status="%{$fg_bold[red]%}%(?..⍉ )%{$reset_color%}"
# Git Status Indicators configuration
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[white]%}◒ "
ZSH_THEME_GIT_PROMPT_CLEAN=" "
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%}✓ "
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%}△ "
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✖ "
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}➜ "
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}§ "
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[blue]%}▲ "
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[white]%}"
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[green]%}"
# Get the time of the last commit on git
# Used in the prompt variable
function _git_branch_status() {
# Only proceed if there is actually a commit. If not, don't do anything
if git log -1 > /dev/null 2>&1; then
# Get the branch name information.
if [[ $(git symbolic-ref --short -q HEAD) == *"/"* ]]; then
branch_name=$(git symbolic-ref --short -q HEAD | cut -f1 -d"-")
else
branch_name=$(git symbolic-ref --short -q HEAD)
fi
now=$(date +%s)
last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
seconds_since_last_commit=$((now-last_commit))
minutes=$((seconds_since_last_commit / 60))
hours=$((seconds_since_last_commit/3600))
if [[ -n $(git status -s 2> /dev/null) ]]; then
SEPARATOR=" "
if [ "$hours" -gt 4 ]; then
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
elif [ "$minutes" -gt 30 ]; then
COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
else
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
fi
else
SEPARATOR=""
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
fi
echo " %{$fg[magenta]%}[$COLOR$branch_name%{$fg[magenta]%}]$SEPARATOR%{$reset_color%}"
fi
}
# ZSH Theme - Based on Bira and Solus.
if [[ $UID -eq 0 ]]; then
local user_symbol='%F{196}#%f'
else
local user_symbol='%F{214}$%f'
fi
ZSH_THEME_SHOW_HOSTNAME=false
ZSH_THEME_DIR_FULLPATH=false
ZSH_THEME_GIT_SHORT_BRANCH_NAME=false
local return_code="%(?..%F{196}%? ↵%f)"
local git_branch='$(_git_branch_status)'
local rvm_ruby='$(ruby_prompt_info)'
local venv_prompt='$(virtualenv_prompt_info)'
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
# Get the user and host information.
if [[ $ZSH_THEME_SHOW_HOSTNAME == true ]]; then
local user_info='%F{81}%n%f%F{245}@%F{206}%m%f '
else
local user_info='%F{81}%n%f%F{245} '
fi
# Get the directory information.
if [[ $ZSH_THEME_DIR_FULLPATH == true ]]; then
local current_dir='%F{245}%~ %b%f'
else
local current_dir='%c$(git_prompt_info)%{$reset_color%} %b%f'
fi
PROMPT="╭─${user_info}${current_dir}${rvm_ruby}${git_branch}
╰─➤ ${venv_prompt} ${user_symbol} "
RPROMPT="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%F{220}% ‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="›%f"
ZSH_THEME_RUBY_PROMPT_PREFIX="%F{154}% ("
ZSH_THEME_RUBY_PROMPT_SUFFIX=")%f"
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%F{202}% ("
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX=")%f"
ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
# Get the time of the last commit on git. Used in the prompt variable.
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[white]%}"
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[green]%}"
function _git_branch_status() {
# Only proceed if there is actually a commit. If not, don't do anything
if git log -1 > /dev/null 2>&1; then
# Get the branch name information.
# if [[ $(git symbolic-ref --short -q HEAD) == *"/"* ]]; then
if [[ $ZSH_THEME_GIT_SHORT_BRANCH_NAME == true ]]; then
local branch_name=$(git symbolic-ref --short -q HEAD | cut -f1 -d"-")
else
local branch_name=$(git symbolic-ref --short -q HEAD)
fi
now=$(date +%s)
last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
seconds_since_last_commit=$((now-last_commit))
minutes=$((seconds_since_last_commit / 60))
hours=$((seconds_since_last_commit/3600))
if [[ -n $(git status -s 2> /dev/null) ]]; then
SEPARATOR=" "
if [ "$hours" -gt 4 ]; then
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
elif [ "$minutes" -gt 30 ]; then
COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
else
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
fi
else
SEPARATOR=""
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
fi
echo "%{$fg[magenta]%}[$COLOR$branch_name%{$fg[magenta]%}]$SEPARATOR%{$reset_color%}"
fi
}
# INSTALL
# cp tmuxconf ~/.tmux.conf
#
# Set prefix key to c-f instead of default c-b
unbind C-b
set -g prefix C-f
bind C-f send-prefix
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
set-option -g default-shell /bin/zsh
# toogle last window by hitting again C-f
bind-key C-f last-window
# if multiple clients are attached to the same window, maximize it to the
# bigger one
set-window-option -g aggressive-resize
# Start windows and pane numbering with index 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# re-number windows when one is closed
set -g renumber-windows on
# word separators for automatic word selection
setw -g word-separators ' @"=()[]_-:,.'
setw -ag word-separators "'"
# Show times longer than supposed
set -g display-panes-time 2000
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# {n}vim compability
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g default-terminal "xterm-256color"
# Split horiziontal and vertical splits, instead of % and ". We also open them
# in the same directory. Because we use widescreens nowadays, opening a
# vertical split that takes half of the screen is not worth. For vertical we
# only open 100 lines width, for horizontal it's 20 columns.
bind-key v split-window -h -l 100 -c '#{pane_current_path}'
bind-key s split-window -v -l 30 -c '#{pane_current_path}'
# Pressing Ctrl+Shift+Left (will move the current window to the left. Similarly
# right. No need to use the modifier (C-b).
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# Source file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` and `Space to also use copy-pipe
unbind -T copy-mode-vi Enter
unbind -T copy-mode-vi Space
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
# setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
# copy text with `y` in copy mode
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# copy text with mouse selection without pressing any key
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set -g status-keys emacs
# focus events enabled for terminals that support them
set -g focus-events on
# Sync panes (Send input to all panes in the window). When enabled, pane
# borders become red as an indication.
bind C-s if -F '#{pane_synchronized}' \
'setw synchronize-panes off; \
setw pane-active-border-style fg=colour63,bg=default; \
setw pane-border-format " #P "' \
'setw synchronize-panes on; \
setw pane-active-border-style fg=red; \
setw pane-border-format " #P - Pane Synchronization ON "'
# Faster command sequence
set -s escape-time 0
# Have a very large history
set -g history-limit 1000000
# Mouse mode on
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mouse on
# Set title
set -g set-titles on
set -g set-titles-string "#T"
# Equally resize all panes
bind-key = select-layout even-horizontal
bind-key | select-layout even-vertical
# Resize panes
bind-key J resize-pane -D 10
bind-key K resize-pane -U 10
bind-key H resize-pane -L 10
bind-key L resize-pane -R 10
# Select panes
# NOTE(arslan): See to prevent cycling https://github.com/tmux/tmux/issues/1158
bind-key j select-pane -D
bind-key k select-pane -U
bind-key h select-pane -L
bind-key l select-pane -R
# Disable confirm before killing
bind-key x kill-pane
# List of plugins
# see this https://github.com/tmux-plugins/tpm to installation
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# The followings are not any kind of setting for Tmux, but crucial to my
# own productivity. Setting them up is really pain, and I probably going to
# forget it. So I'm just putting them here again.
######## iTerm + Tmux key integration #########
# First of all, iTerm can send hex codes for shortcuts you define. So for
# example you can send a hex code for the shortcut "c-f v" which in my case
# opens a vertical pane (see setting above). The hex code for this combination
# is: 0x06 0x76. There are many cases to find it out. One of them is the tool
# 'xxd'
# If you run "xxd -psd" and hit "c-f v" and then enter and finally c-c to exit
# , it outputs the following:
#
# $ xxd -psd
# ^Fv
# 06760a^C
#
# What matters is the sequence 06760a^C where:
#
# 06 -> c-f
# 76 -> v
# 0a -> return
# ^C -> c-c
#
# From here, we know that 0x06 0x76 corresponds to "c-f v".
#
# Finally, inside the iTerm2 Key settings, I'm adding just various shortcuts,
# such as cmd-j, cmd-left, etc.. , select the option "send hex code" and the
# enter the hex code which I want to be executed, hence the tmux sequence. So
# when I press CMD + d in iterm, I send the sequence 0x06 0x76,
# which tmux inteprets it as opening a new pane.
##############################################################################
################################ Color Scheme ################################
# This tmux statusbar config was created by tmuxline.vim
# on Mon, 08 Feb 2021
# This tmux statusbar config was created by tmuxline.vim
# on Mon, 08 Feb 2021
set -g status-justify "left"
set -g status "on"
set -g status-left-style "none"
set -g message-command-style "fg=#a89984,bg=#504945"
set -g status-right-style "none"
set -g pane-active-border-style "fg=#a89984"
set -g status-position "top"
set -g status-style "none,bg=#3c3836"
set -g message-style "fg=#a89984,bg=#504945"
set -g pane-border-style "fg=#504945"
set -g status-right-length "100"
set -g status-left-length "100"
setw -g window-status-activity-style "underscore,fg=#a89984,bg=#3c3836"
setw -g window-status-separator ""
setw -g window-status-style "none,fg=#a89984,bg=#3c3836"
set -g status-left "#[fg=#1d2021,bg=#a89984] #S #[fg=#a89984,bg=#3c3836,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#3c3836,bg=#3c3836,nobold,nounderscore,noitalics]#[fg=#a89984,bg=#3c3836] %a #[fg=#504945,bg=#3c3836,nobold,nounderscore,noitalics]#[fg=#a89984,bg=#504945] %Y-%m-%d %H:%M #[fg=#a89984,bg=#504945,nobold,nounderscore,noitalics]#[fg=#1d2021,bg=#a89984]  #h "
setw -g window-status-format "#[fg=#3c3836,bg=#3c3836,nobold,nounderscore,noitalics]#[default] #I #W #[fg=#3c3836,bg=#3c3836,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#3c3836,bg=#504945,nobold,nounderscore,noitalics]#[fg=#a89984,bg=#504945] #I #W #[fg=#504945,bg=#3c3836,nobold,nounderscore,noitalics]"
##############################################################################
{
"workbench.settings.editor": "json",
"window.autoDetectColorScheme": false,
"workbench.colorTheme": "Atomizer Dark",
"workbench.preferredDarkColorTheme": "Atomizer Dark",
"workbench.preferredLightColorTheme": "Atomizer Light",
"workbench.productIconTheme": "el-vsc-v1-icons",
"workbench.iconTheme": "moxer-icons",
"workbench.tree.indent": 14,
"workbench.editor.enablePreview": true,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.focusRecentEditorAfterClose": true,
"workbench.editor.highlightModifiedTabs": false,
"workbench.editor.scrollToSwitchTabs": false,
"workbench.editor.showTabs": true,
"workbench.editor.showIcons": true,
"workbench.editor.tabCloseButton": "right",
"workbench.editor.untitled.hint": "hidden",
"workbench.enableExperiments": false,
"workbench.panel.opensMaximized": "preserve",
"workbench.tree.renderIndentGuides": "onHover",
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.settings.openDefaultSettings": false,
"workbench.settings.useSplitJSON": false,
"workbench.startupEditor": "newUntitledFile",
"workbench.statusBar.visible": true,
"workbench.tips.enabled": false,
"workbench.view.alwaysShowHeaderActions": true,
"workbench.fontAliasing": "antialiased",
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
"breadcrumbs.enabled": false,
"editor.matchBrackets": false,
"editor.accessibilitySupport": "off",
"editor.autoClosingBrackets": "languageDefined",
"editor.autoIndent": "advanced",
"editor.autoSurround": "never",
"editor.codeLens": true,
"editor.colorDecorators": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": true,
"editor.cursorWidth": 2,
"editor.inlineSuggest.enabled": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.detectIndentation": false,
"editor.dragAndDrop": false,
"editor.emptySelectionClipboard": false,
"editor.bracketPairColorization.enabled": true,
"editor.suggest.preview": true,
"editor.find.autoFindInSelection": "never",
"editor.folding": false,
"editor.glyphMargin": true,
"editor.fontFamily": "'Hack', 'JetBrains Mono', 'Monaco', 'Roboto Mono', 'Consolas'",
"editor.fontLigatures": true,
"editor.linkedEditing": true,
"editor.fontSize": 13,
"editor.lineHeight": 27,
"editor.fontWeight": "400",
"editor.lineNumbers": "on",
"editor.formatOnSave": false,
"editor.hideCursorInOverviewRuler": true,
"editor.insertSpaces": true,
"editor.letterSpacing": 0,
"editor.guides.bracketPairs": true,
"editor.guides.bracketPairsHorizontal": true,
"editor.guides.highlightActiveBracketPair": true,
"editor.links": false,
"editor.minimap.enabled": false,
"editor.minimap.maxColumn": 100,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.mouseWheelZoom": false,
"editor.multiCursorModifier": "ctrlCmd",
"editor.occurrencesHighlight": false,
"editor.parameterHints.enabled": false,
"editor.quickSuggestionsDelay": 0,
"editor.selectionHighlight": true,
"editor.semanticHighlighting.enabled": false,
"editor.renderControlCharacters": false,
"editor.renderLineHighlight": "gutter",
"editor.renderWhitespace": "trailing",
"editor.roundedSelection": false,
"editor.scrollBeyondLastLine": false,
"editor.smoothScrolling": true,
"editor.snippetSuggestions": "top",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "on",
"editor.tabSize": 4,
"editor.hover.delay": 500,
"editor.wordSeparators": "`~!@#%^&*()=-+[{]}\\|;:'\",.<>/?$",
"editor.wordWrap": "off",
"editor.cursorStyle": "line-thin",
"editor.gotoLocation.multipleReferences": "goto",
"editor.gotoLocation.multipleDefinitions": "goto",
"editor.gotoLocation.multipleDeclarations": "goto",
"editor.gotoLocation.multipleImplementations": "goto",
"editor.gotoLocation.multipleTypeDefinitions": "goto",
"editor.quickSuggestions": {
"strings": true
},
"editor.codeActionsOnSave": {
"source.organizeImports": false,
"source.fixAll": false,
"source.fixAll.eslint": true,
"source.fixAll.stylelint": false
},
"explorer.decorations.colors": true,
"explorer.autoReveal": false,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"explorer.decorations.badges": false,
"explorer.openEditors.visible": 0,
"explorer.sortOrder": "default",
"screencastMode.fontSize": 36,
"screencastMode.mouseIndicatorSize": 32,
"screencastMode.verticalOffset": 0,
"window.titleBarStyle": "custom",
"window.nativeTabs": false,
"window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
"window.newWindowDimensions": "offset",
"terminal.integrated.tabs.enabled": false,
"terminal.integrated.defaultLocation": "editor",
"terminal.integrated.showLinkHover": true,
"terminal.integrated.allowChords": false,
"terminal.integrated.unicodeVersion": "11",
"terminal.integrated.splitCwd": "inherited",
"terminal.integrated.fontFamily": "'Monaco', 'Menlo for Powerline', 'Roboto Mono', 'Consolas'",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": ["${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe"],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
},
"terminal.integrated.profiles.osx": {
"zsh": {
"path": "zsh",
"args": ["-l"]
},
"tmux": {
"path": "tmux",
"icon": "terminal",
"args": ["new-session", "-A", "-D", "-s", "VSCode Terminal"]
}
},
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.external.windowsExec": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"terminal.external.osxExec": "Terminal.app",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.cursorStyle": "underline",
"terminal.integrated.fontSize": 11,
"terminal.integrated.fontWeight": "300",
"terminal.integrated.gpuAcceleration": "canvas",
"terminal.integrated.macOptionIsMeta": true,
"update.showReleaseNotes": false,
"problems.decorations.enabled": false,
"extensions.autoUpdate": true,
"extensions.autoCheckUpdates": true,
"extensions.ignoreRecommendations": true,
"security.workspace.trust.enabled": false,
"security.workspace.trust.startupPrompt": "once",
"security.workspace.trust.untrustedFiles": "open",
"diffEditor.ignoreTrimWhitespace": false,
"diffEditor.renderSideBySide": false,
"zenMode.centerLayout": false,
"zenMode.fullScreen": true,
"zenMode.hideLineNumbers": false,
"task.quickOpen.showAll": false,
"debug.openDebug": "neverOpen",
"debug.showInStatusBar": "never",
"debug.console.wordWrap": false,
"debug.terminal.clearBeforeReusing": true,
"debug.toolBarLocation": "hidden",
"git.terminalAuthentication": true,
"git.countBadge": "tracked",
"git.untrackedChanges": "separate",
"git.ignoreLimitWarning": true,
"git.showCommitInput": false,
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.ignoreMissingGitWarning": true,
"gitlens.codeLens.enabled": false,
"gitlens.currentLine.enabled": true,
"gitlens.advanced.messages": { "suppressLineUncommittedWarning": true },
"gitlens.mode.statusBar.enabled": false,
"gitlens.defaultDateStyle": "absolute",
"gitlens.defaultDateFormat": "D MMM YYYY, h:mm:ss a",
"gitlens.mode.active": "all",
"gitlens.statusBar.format": "${author}, ${date}",
"gitlens.menus": false,
"telemetry.telemetryLevel": "off",
"files.encoding": "utf8",
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.autoSave": "off",
"files.associations": {
".php_cs.dist": "php",
".php_cs": "php",
".prettierrc": "yaml",
"*.blade.php": "blade",
"*.erb": "erb",
"*.geojson": "json",
"*.jsx": "javascriptreact",
"*.ts": "typescriptreact",
"*.tsx": "typescriptreact",
"*.less": "less",
"*.scss": "scss"
},
"files.exclude": {
"**/__pycache__": true,
"**/.cache": true,
"**/.classpath": true,
"**/.DS_Store": true,
"**/.factorypath": true,
"**/.firebase": true,
"**/.git": true,
"**/.gradle": true,
"**/.hg": true,
"**/.idea": true,
"**/.next": true,
"**/.nuxt": true,
"**/.java-version": true,
"**/.parcel-cache": true,
"**/.phpunit.result.cache": true,
"**/.project": true,
"**/.pytest_cache": true,
"**/.quarantine": true,
"**/.settings": true,
"**/.svn": true,
"**/.tmb": true,
"**/.tmp": true,
"**/.turbo": true,
"**/.venv": true,
"**/.vscode": false,
"**/*.pyc": true,
"**/artisan": true,
"**/composer.lock": true,
"**/CVS": true,
"**/out": true,
"**/docker": false,
"**/env*": true,
"**/gradle/": false,
"**/gradlew.bat": true,
"**/gradlew": true,
"**/mix-manifest.json": true,
"**/node_modules": true,
"**/.strapi-updater.json": true,
"**/package-lock.json": true,
"**/phpunit-log-*.php": true,
"**/Pipfile.lock": true,
"**/precompiled": true,
"**/vendor": false,
"**/venv": true,
"**/yarn-error.log": true,
"**/yarn.lock": true
},
"files.watcherExclude": {
"**/__pycache__/**": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/.next/**": true,
"**/.nuxt/**": true,
"**/.cache/**": true,
"**/.turbo/**": true,
"**/.tmp/**": true,
"**/build/**": true,
"**/env/**": true,
"**/node_modules/**": true,
"**/precompiled": true,
"**/vendor/**": true,
"**/venv/**": true,
"**/out/**": true,
"env-*": true,
"env.*": true
},
"search.exclude": {
"**/.cache": true,
"**/.next": true,
"**/.nuxt": true,
"**/.tmp": true,
"**/bower_components": true,
"**/build": true,
"**/dist": true,
"**/docker": true,
"**/env": true,
"**/node_modules": true,
"**/precompiled": true,
"**/public/[abcdefghjklmnopqrstuvwxyz]*": true,
"**/public/i[abcdefghijklmopqrstuvwxyz]*": true,
"**/vendor": true,
"**/venv": true,
"storage/framework": true
},
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"blade": "html",
"javascript": "javascriptreact",
"markdown": "html",
"twig": "html",
"typescriptreact": "html",
"vue-html": "html"
},
"npm.packageManager": "yarn",
"html.autoClosingTags": true,
"html.format.endWithNewline": true,
"html.format.indentHandlebars": true,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"php.suggest.basic": false,
"php.validate.enable": false,
"javascript.autoClosingTags": true,
"javascript.referencesCodeLens.enabled": true,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.validate.enable": true,
"typescript.autoClosingTags": true,
"typescript.check.npmIsInstalled": false,
"typescript.disableAutomaticTypeAcquisition": false,
"typescript.implementationsCodeLens.enabled": true,
"typescript.referencesCodeLens.enabled": true,
"typescript.suggest.autoImports": true,
"typescript.surveys.enabled": false,
"typescript.tsserver.log": "off",
"typescript.updateImportsOnFileMove.enabled": "always",
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.rulers": [80],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false,
"editor.tabSize": 2
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[go]": {
"editor.formatOnSave": false,
"editor.tabSize": 2
},
"[Log]": {
"editor.fontSize": 13
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false,
"source.fixAll.stylelint": false
}
},
"[java]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[javascript]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false,
"source.fixAll": true,
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
"[typescriptreact]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false,
"source.fixAll": true,
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
"[git-commit]": {
"editor.rulers": [
{
"column": 50,
"color": "#50e782"
},
{
"column": 72,
"color": "#ff7b00"
}
],
"editor.wordWrap": "on",
"workbench.editor.restoreViewState": true
},
"[jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[m3u]": {
"files.insertFinalNewline": false
},
"[markdown]": {
"editor.wordWrap": "off",
"editor.quickSuggestions": false,
"files.trimTrailingWhitespace": false,
"editor.formatOnSave": true
},
"[php]": {
"editor.quickSuggestions": { "comments": true },
"editor.defaultFormatter": "valeryanm.vscode-phpsab",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[postcss]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[css]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[plaintext]": {
"editor.quickSuggestions": false,
"editor.insertSpaces": false,
"files.insertFinalNewline": false,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": false
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma",
"editor.formatOnSave": true
},
"[nginx]": {
"editor.defaultFormatter": "ahmadalli.vscode-nginx-conf",
"editor.formatOnSave": false
},
"[blade]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "onecentlin.laravel-blade",
"editor.autoClosingBrackets": "always",
"editor.formatOnSave": false
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
},
"[xml]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "DotJoshJohnson.xml"
},
"settingsSync.ignoredSettings": ["[scminput]"],
"prettier.embeddedLanguageFormatting": "off",
"prettier.jsxSingleQuote": true,
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.useTabs": false,
"prettier.tabWidth": 4,
"codesnap.backgroundColor": "#abb8c3",
"codesnap.boxShadow": "rgba(0, 0, 0, 0.55) 0px 20px 68px",
"codesnap.containerPadding": "1.8em",
"codesnap.roundedCorners": true,
"codesnap.showWindowControls": false,
"codesnap.showWindowTitle": false,
"codesnap.showLineNumbers": true,
"codesnap.realLineNumbers": false,
"codesnap.transparentBackground": true,
"codesnap.target": "container",
"todo-tree.highlights.enabled": true,
"todo-tree.tree.flat": true,
"todo-tree.tree.scanMode": "workspace",
"npm-intellisense.packageSubfoldersIntellisense": false,
"npm-intellisense.scanDevDependencies": true,
"eslint.packageManager": "yarn",
"eslint.alwaysShowStatus": false,
"eslint.format.enable": false,
"eslint.validate": ["typescript"],
"eslint.quiet": true,
"blade.format.enable": true,
"headwind.removeDuplicates": true,
"headwind.prependCustomClasses": false,
"headwind.runOnSave": true,
"phpsab.standard": "PSR2",
"phpsab.fixerArguments": ["-n", "--ignore=tests/*"],
"phpsab.executablePathCBF": "/Users/ariss/.composer/vendor/bin/phpcbf",
"phpsab.executablePathCS": "/Users/ariss/.composer/vendor/bin/phpcs",
"subtleBrackets.disableNative": true,
"subtleBrackets.style": {
"borderWidth": "2px",
"borderColor": "#528BFF"
},
"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)",
"todo-tree.general.tags": ["BUG", "HACK", "FIXME", "TODO", "XXX", "[ ]", "[x]"],
"github.copilot.enable": {
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false,
"dockercompose": false,
"dotenv": false,
"json": false,
"postcss": false,
"xml": false
},
"debugControlsInTitlebar.hideDebugStart": false,
"fileExtra.openFileAfterDuplication": true,
"fileExtra.closeFileAfterRemove": false,
"editor.tokenColorCustomizations": {
"textMateRules": []
},
"editor.unicodeHighlight.ambiguousCharacters": false,
"workbench.activityBar.visible": false
// "update.enableWindowsBackgroundUpdates": false,
// "innosetup.pathToIscc": "C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe",
// "pascal.format.wrapLineLength": 80,
// "pascal.format.indent": 2,
// "dart.checkForSdkUpdates": false,
// "dart.previewLsp": true,
// "dart.allowAnalytics": false,
// "dart.debugExternalLibraries": false,
// "dart.debugSdkLibraries": false,
// "dart.runPubGetOnPubspecChanges": false,
// "liveshare.audio.joinCallBehavior": "accept",
// "java.configuration.runtimes": [
// {
// "name": "JavaSE-1.8",
// "path": "/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home"
// },
// {
// "name": "JavaSE-11",
// "path": "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home"
// }
// ],
// "java.home": "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home",
// "sonarlint.disableTelemetry": true,
// "sonarlint.ls.javaHome": "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home",
// "sonarlint.rules": {
// "javascript:S1488": {
// "level": "off"
// },
// "typescript:S3358": {
// "level": "off"
// }
// }
}
[
{
"key": "cmd+t",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "cmd+t",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "alt+cmd+right",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "alt+cmd+left",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
{
"key": "cmd+k cmd+k",
"command": "workbench.action.toggleZenMode"
},
{
"key": "cmd+e cmd+e",
"command": "workbench.action.focusActiveEditorGroup"
},
{
"key": "cmd+shift+e",
"command": "workbench.action.toggleSidebarVisibility",
"when": "explorerViewletVisible"
},
]
#!/bin/bash
#
# Auto installation, run as root:
#
# bash <(curl -sLo- https://git.io/fjjKv || wget -qO- https://git.io/fjjKv)
#
# Exclude this path in Windows Defender:
# %USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc
# %USERPROFILE%\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4
#
cat > /etc/apt/sources.list <<EOF
deb http://mirror.unej.ac.id/ubuntu $(lsb_release -cs) main restricted universe multiverse
deb http://mirror.unej.ac.id/ubuntu $(lsb_release -cs)-updates main restricted universe multiverse
deb http://mirror.unej.ac.id/ubuntu $(lsb_release -cs)-security main restricted universe multiverse
deb http://mirror.unej.ac.id/ubuntu $(lsb_release -cs)-proposed main restricted universe multiverse
deb http://deb.nodesource.com/node_12.x $(lsb_release -cs) main
EOF
# cat > /etc/apt/sources.list <<EOF
# deb http://cloudfront.debian.net/debian $(lsb_release -cs) main contrib non-free
# deb http://cloudfront.debian.net/debian $(lsb_release -cs)-updates main contrib non-free
# deb http://cloudfront.debian.net/debian-security $(lsb_release -cs)/updates main contrib non-free
# deb http://deb.nodesource.com/node_12.x $(lsb_release -cs) main
# EOF
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
apt update && apt -y full-upgrade && apt -y install ca-certificates apt-transport-https
sed -i "s/http:/https:/" /etc/apt/sources.list && apt update && apt -y autoremove
apt -y install software-properties-common lsb-release nano git curl perl openssl crudini figlet jq \
elinks pwgen dirmngr gnupg debconf-utils gcc make cmake build-essential pv zip unzip bsdtar binutils \
dnsutils whois lsof dh-autoreconf rsync screenfetch jpegoptim optipng sshpass ansible s3cmd sqlite3 \
python3-{dev,wheel,setuptools,pip,venv,psycopg2,postgresql,mysqldb,virtualenv} virtualenv mcrypt \
gettext aspell imagemagick graphviz python3 apache2-utils libpq-dev composer nodejs mariadb-client \
php-{amqpamqplib,amqplib,bcmath,cli,common,curl,gd,gmp,imap,intl,json,mbstring,mongodb,mysql,pgsql}
php-{readline,soap,sqlite3,xdebug,xml,xmlrpc,zip}
perl -pi -e 's#(.*sudo.*ALL=)(.*)#${1}(ALL) NOPASSWD:ALL#' /etc/sudoers
# curl -L# https://git.io/fjTKE -o /usr/bin/crudini ; chmod +x /usr/bin/crudini
# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 >/dev/null 2>&1
# update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2 >/dev/null 2>&1
# update-alternatives --set python /usr/bin/python3.6 >/dev/null 2>&1 && python -V
crudini --set /etc/mysql/conf.d/mysql.cnf 'mysql' 'host' '127.0.0.1'
USER=`id -nu 1000`
runuser -l $USER -c 'composer config -g repos.packagist composer https://packagist.phpindonesia.id'
runuser -l $USER -c 'composer global require hirak/prestissimo squizlabs/php_codesniffer laravel/installer'
runuser -l $USER -c 'sudo npm i -g git-upload degit serve eslint eslint-plugin-react eslint-plugin-vue'
mkdir -p /home/$USER/.ssh ; chmod 0700 $_ ; touch $_/{authorized_keys,id_rsa,id_rsa.pub}
chown -R ${USER}: /home/$USER/.ssh && chmod 0600 /home/$USER/.ssh/*
if ! grep -q 'composer' /home/$USER/.bashrc ; then
echo -e '\nexport PATH=$PATH:$HOME/.config/composer/vendor/bin:$HOME/.yarn/bin' >> /home/$USER/.bashrc
echo -e "\nalias grp='git reset --hard HEAD && git pull'" >> /home/$USER/.bashrc
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment