Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.

# Composer Packages
composer config -g repos.packagist composer https://packagist.phpindonesia.id
composer global require hirak/prestissimo squizlabs/php_codesniffer laravel/installer

# Global NPM packages
# https://github.com/sindresorhus/generator-electron
npm i -g git-upload degit vsce serve vercel express express-generator firebase-tools
npm i -g eslint eslint-plugin-react eslint-plugin-vue madge cloudflare-cli
npm i -g @cloudflare/wrangler cloudflare-cli release commitizen yo generator-electron

# Python libaries
pip install gunicorn pylint

# Git config
git config --global core.excludesfile ~/.gitignore
git config --global user.name "Aris Ripandi"
git config --global user.email "aris@ripandi.id"
git config --global core.autocrlf false
git config --global core.eol lf
git config --global pull.rebase false

# NPM config
npm config set init.author.name  "Aris Ripandi"
npm config set init.author.email "aris@rcs.web.id"
npm config set init.author.url "github.com/riipandi"
npm config set init.license "Apache-2.0"
# Required
code --install-extension enkia.tokyo-night
code --install-extension will-stone.plastic
code --install-extension GitHub.github-vscode-theme
code --install-extension helgardrichard.helium-icon-theme
code --install-extension EditorConfig.EditorConfig
code --install-extension gruntfuggly.todo-tree
code --install-extension fabiospampinato.vscode-projects-plus
code --install-extension BriteSnow.vscode-toggle-quotes
code --install-extension aaron-bond.better-comments
code --install-extension philsinatra.nested-comments
code --install-extension wwm.better-align
code --install-extension dotjoshjohnson.xml
code --install-extension be5invis.toml
code --install-extension vincaslt.highlight-matching-tag
code --install-extension esbenp.prettier-vscode
code --install-extension sleistner.vscode-fileutils
code --install-extension shardulm94.trailing-spaces
code --install-extension oliversturm.fix-json
code --install-extension quicktype.quicktype

code --install-extension CoenraadS.bracket-pair-colorizer-2
code --install-extension bierner.github-markdown-preview
code --install-extension yzhang.markdown-all-in-one
code --install-extension darkriszty.markdown-table-prettify
code --install-extension shd101wyy.markdown-preview-enhanced
code --install-extension bradymholt.pgformatter

# Essential
# code --install-extension TabNine.tabnine-vscode
# code --install-extension SonarSource.sonarlint-vscode
code --install-extension deerawan.vscode-faker
code --install-extension jsynowiec.vscode-insertdatestring
code --install-extension jrebocho.vscode-random
code --install-extension adpyke.vscode-sql-formatter
code --install-extension coolbear.systemd-unit-file
code --install-extension mrmlnc.vscode-apache
code --install-extension shanoor.vscode-nginx
code --install-extension raynigon.nginx-formatter
code --install-extension mikestead.dotenv

# Common CSS and JS
code --install-extension pranaygp.vscode-css-peek
code --install-extension vscode.typescript-language-features
code --install-extension bradlc.vscode-tailwindcss
code --install-extension Zignd.html-css-class-completion
code --install-extension syler.sass-indented
code --install-extension mrmlnc.vscode-scss
code --install-extension christian-kohler.npm-intellisense
code --install-extension pflannery.vscode-versionlens
code --install-extension xabikos.javascriptsnippets
code --install-extension dbaeumer.vscode-eslint
code --install-extension msjsdiag.debugger-for-chrome

# React
code --install-extension mgmcdermott.vscode-language-babel
code --install-extension planbcoding.vscode-react-refactor
code --install-extension silvenon.mdx

# Vue
code --install-extension octref.vetur
code --install-extension sdras.vue-vscode-snippets

# PHP Essential
code --install-extension calebporzio.simple-php-cs-fixer
code --install-extension calebporzio.better-phpunit
code --install-extension MehediDracula.php-namespace-resolver
code --install-extension marabesi.php-import-checker

# Laravel Development
code --install-extension onecentlin.laravel-blade
code --install-extension onecentlin.laravel5-snippets
code --install-extension codingyu.laravel-goto-view
code --install-extension stef-k.laravel-goto-controller
code --install-extension amiralizadeh9480.laravel-extra-intellisense
code --install-extension mohamedbenhida.laravel-intellisense

# Java Development
code --install-extension redhat.java
code --install-extension richardwillis.vscode-gradle
code --install-extension naco-siren.gradle-language
code --install-extension Pivotal.vscode-spring-boot
code --install-extension gabrielbb.vscode-lombok
code --install-extension vscjava.vscode-java-debug
code --install-extension vscjava.vscode-java-dependency
code --install-extension vscjava.vscode-spring-initializr
code --install-extension vscjava.vscode-spring-boot-dashboard
code --install-extension VisualStudioExptTeam.vscodeintellicode

# Python Development
code --install-extension cstrap.flask-snippets
code --install-extension njpwerner.autodocstring
code --install-extension ms-python.python
code --install-extension kevinrose.vsc-python-indent

# Extended
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-azuretools.vscode-docker
code --install-extension ms-vscode-remote.remote-containers
code --install-extension Dart-Code.flutter
code --install-extension ms-dotnettools.csharp
code --install-extension leopotam.csharpfixformat
code --install-extension ms-vscode.Go

# Windows Only
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension idleberg.innosetup

# Fix Unsupported on Mac
code --install-extension lehni.vscode-fix-checksums

Windows Defender exclude: %HOMEPATH%\.Rider2019.2 and %HOMEPATH%\.nuget

# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
#TERM: alacritty
window:
dimensions:
columns: 168
lines: 44
position:
x: 71
y: 0
padding:
x: 8
y: 10
# full / transparent / none
decorations: none
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
startup_mode: Windowed
title: Terminal
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: Jetbrains Mono
style: Regular
bold:
family: Monaco
style: Bold
italic:
family: Monaco
style: Italic
bold_italic:
family: Monaco
style: Bold Italic
size: 14
offset:
x: 1
y: 1
use_thin_strokes: true
# Colors (Tomorrow Night Bright)
colors:
primary:
background: '#000000'
foreground: '#eaeaea'
cursor:
text: '#000000'
cursor: '#ffffff'
vi_mode_cursor:
text: '#000000'
cursor: '#ffffff'
selection:
text: '#eaeaea'
background: '#404040'
normal:
black: '#000000'
red: '#d54e53'
green: '#b9ca4a'
yellow: '#e6c547'
blue: '#7aa6da'
magenta: '#c397d8'
cyan: '#70c0ba'
white: '#eaeaea'
bright:
black: '#666666'
red: '#ff3334'
green: '#9ec400'
yellow: '#e7c547'
blue: '#7aa6da'
magenta: '#b77ee0'
cyan: '#54ced6'
white: '#ffffff'
dim:
black: '#000000'
red: '#8c3336'
green: '#7a8530'
yellow: '#97822e'
blue: '#506d8f'
magenta: '#80638e'
cyan: '#497e7a'
white: '#9a9a9a'
background_opacity: 0.88
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
dynamic_title: true
cursor:
style: Underline
live_config_reload: true
# shell:
# program: /usr/local/bin/pwsh
# args:
# - -NoLogo
# - -WorkingDirectory
# - '~/'
shell:
program: /bin/zsh
args:
- --login
working_directory: None
# 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
# - Copy
# - Paste
# - PasteSelection
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Minimize
# - Quit
# - ToggleFullscreen
# - SpawnNewInstance
# - ClearLogNotice
# - ClearSelection
# - ReceiveChar
# - None
#
# (macOS only):
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
#
# (Linux/BSD only):
# - CopySelection: Copies into selection buffer
#
# - `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
# - Alt
#
# 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
# at once.
key_bindings:
- { key: Paste, action: Paste }
- { key: Copy, action: Copy }
- { key: L, mods: Control, action: ClearLogNotice }
- { 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 }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Add, mods: Control, action: IncreaseFontSize }
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
- { key: Key0, mods: Command, action: ResetFontSize }
- { key: Equals, mods: Command, action: IncreaseFontSize }
- { key: Add, mods: Command, action: IncreaseFontSize }
- { key: Minus, mods: Command, action: DecreaseFontSize }
- { key: K, mods: Command, action: ClearHistory }
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: H, mods: Command, action: Hide }
- { 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 }
debug:
render_timer: false
persistent_logging: false
log_level: Error
print_events: false
# Configuration for Alacritty, the GPU enhanced terminal emulator.
window:
dimensions:
columns: 120
lines: 34
position:
x: 20
y: 360
padding:
x: 9
y: 10
decorations: full
title: Terminal
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: Jetbrains Mono
style: Regular
bold:
family: Jetbrains Mono
style: Bold
italic:
family: Jetbrains Mono
style: Italic
bold_italic:
family: Jetbrains Mono
style: Bold Italic
size: 11
offset:
x: 0
y: 0
use_thin_strokes: true
# Colors (Tomorrow Night Bright)
colors:
primary:
background: '#000000'
foreground: '#eaeaea'
cursor:
text: '#000000'
cursor: '#ffffff'
vi_mode_cursor:
text: '#000000'
cursor: '#ffffff'
selection:
text: '#eaeaea'
background: '#404040'
normal:
black: '#000000'
red: '#d54e53'
green: '#b9ca4a'
yellow: '#e6c547'
blue: '#7aa6da'
magenta: '#c397d8'
cyan: '#70c0ba'
white: '#eaeaea'
bright:
black: '#666666'
red: '#ff3334'
green: '#9ec400'
yellow: '#e7c547'
blue: '#7aa6da'
magenta: '#b77ee0'
cyan: '#54ced6'
white: '#ffffff'
dim:
black: '#000000'
red: '#8c3336'
green: '#7a8530'
yellow: '#97822e'
blue: '#506d8f'
magenta: '#80638e'
cyan: '#497e7a'
white: '#9a9a9a'
background_opacity: 0.89
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
dynamic_title: true
cursor:
style: Underline
live_config_reload: true
shell:
program: 'C:\\Program Files\\PowerShell\\7\\pwsh.exe'
args:
- -NoLogo
- -WorkingDirectory
- 'D:\\Sandbox'
working_directory: None
debug:
render_timer: false
persistent_logging: false
log_level: Error
print_events: false
module.exports = {
config: {
updateChannel: "stable",
opacity: 0.96,
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: true,
defaultSSHApp: 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'],
hyperBorder: {
borderColors: ["#FF2C70", "#6937FF"],
borderWidth: "1px",
borderRadiusInner: "4px",
borderRadiusOuter: "4px",
},
},
plugins: [
// 'hyper-electron-highlighter',
"shades-of-purple-hyper",
"hyper-single-instance",
"hyper-font-smoothing",
"hyper-broadcast",
"hyper-opacity",
"hyperborder",
],
}
{
"workbench.colorTheme": "GitHub Dark",
"workbench.iconTheme": "helium-icon-theme",
"workbench.colorCustomizations": {
"editorRuler.foreground": "#0F4C81",
"[Tokyo Night]": {
"editorCodeLens.foreground": "#7982a9",
"window.activeBorder": "#0F4C81",
"window.inactiveBorder": "#7982a9"
},
},
"workbench.fontAliasing": "antialiased",
"workbench.activityBar.visible": false,
"workbench.editor.enablePreview": true,
"workbench.editor.showTabs": true,
"workbench.editor.scrollToSwitchTabs": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.focusRecentEditorAfterClose": true,
"workbench.editor.highlightModifiedTabs": true,
"workbench.editor.showIcons": false,
"workbench.enableExperiments": false,
"workbench.settings.editor": "json",
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.settings.openDefaultSettings": false,
"workbench.settings.useSplitJSON": false,
"workbench.sideBar.location": "right",
"workbench.panel.defaultLocation": "bottom",
"workbench.startupEditor": "newUntitledFile",
"workbench.tips.enabled": false,
"editor.codeLens": true,
"editor.accessibilitySupport": "off",
"editor.autoClosingBrackets": "languageDefined",
"editor.autoIndent": "advanced",
"editor.autoSurround": "never",
"editor.colorDecorators": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": true,
"editor.cursorWidth": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.detectIndentation": false,
"editor.dragAndDrop": false,
"editor.find.autoFindInSelection": "never",
"editor.fontFamily": "'Jetbrains Mono', 'Monaco', 'Roboto Mono', 'Consolas'",
"editor.fontLigatures": true,
"editor.emptySelectionClipboard": false,
"editor.wordSeparators": "`~!@#%^&*()=-+[{]}\\|;:'\",.<>/?$",
"editor.fontSize": 13,
"editor.fontWeight": "300",
"editor.letterSpacing": 0.16,
"editor.lineHeight": 22,
"editor.formatOnSave": false,
"editor.glyphMargin": true,
"editor.insertSpaces": true,
"editor.links": false,
"editor.minimap.enabled": false,
"editor.minimap.maxColumn": 80,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.mouseWheelZoom": false,
"editor.multiCursorModifier": "ctrlCmd",
"editor.parameterHints.enabled": false,
"editor.quickSuggestionsDelay": 0,
"diffEditor.ignoreTrimWhitespace": false,
"editor.renderControlCharacters": false,
"editor.renderLineHighlight": "gutter",
"editor.renderIndentGuides": false,
"editor.renderWhitespace": "boundary",
"editor.matchBrackets": "always",
"editor.rulers": [110, 110],
"editor.roundedSelection": true,
"editor.scrollBeyondLastLine": false,
"editor.smoothScrolling": true,
"editor.snippetSuggestions": "top",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "on",
"editor.tabSize": 4,
"editor.wordWrap": "off",
"zenMode.centerLayout": false,
"zenMode.fullScreen": true,
"zenMode.hideLineNumbers": false,
"breadcrumbs.enabled": false,
"problems.decorations.enabled": false,
"window.titleBarStyle": "custom",
"window.newWindowDimensions": "default",
"window.title": "${activeEditorMedium}${separator}${rootName} ${dirty}",
"window.zoomLevel": 0,
"explorer.autoReveal": false,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"explorer.decorations.badges": false,
"explorer.openEditors.visible": 0,
"explorer.sortOrder": "default",
"update.showReleaseNotes": false,
"extensions.autoUpdate": true,
"extensions.autoCheckUpdates": true,
"extensions.ignoreRecommendations": true,
"git.terminalAuthentication": true,
"terminal.integrated.macOptionIsMeta": true,
"terminal.integrated.cursorStyle": "underline",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.rendererType": "dom",
"terminal.integrated.fontWeight": "normal",
"terminal.integrated.fontSize": 11,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"task.quickOpen.showAll": false,
"files.encoding": "utf8",
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"git.showCommitInput": false,
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.ignoreMissingGitWarning": true,
"html.autoClosingTags": true,
"html.format.endWithNewline": true,
"html.format.indentHandlebars": true,
"files.autoSave": "off",
"files.associations": {
".php_cs.dist": "php",
".php_cs": "php",
".prettierrc": "yaml",
"*.blade.php": "blade",
"*.erb": "erb",
"*.jsx": "javascriptreact",
"*.less": "less",
"*.md": "markdown",
"*.php": "php",
"*.scss": "sass",
"*.vue": "vue"
},
"files.exclude": {
"**/__pycache__": true,
"**/.classpath": true,
"**/.DS_Store": true,
"**/.factorypath": true,
"**/.parcel-cache": true,
"**/.firebase": true,
"**/.git": true,
"**/.gradle": true,
"**/.hg": true,
"**/.idea": true,
"**/.phpunit.result.cache": true,
"**/.project": true,
"**/.pytest_cache": true,
"**/.quarantine": true,
"**/.settings": true,
"**/.svn": true,
"**/.tmb": true,
"**/.venv": true,
"**/.vscode": false,
"**/*.pyc": true,
"**/artisan": true,
"**/composer.lock": true,
"**/Pipfile.lock": true,
"**/CVS": true,
"**/docker": true,
"**/env*": true,
"**/gradle/": true,
"**/gradlew.bat": true,
"**/gradlew": true,
"**/mix-manifest.json": true,
"**/node_modules": false,
"**/package-lock.json": true,
"**/phpunit-log-*.php": true,
"**/vendor": false,
"**/venv": true,
"**/yarn-error.log": true,
"**/yarn.lock": true
},
"files.watcherExclude": {
"**/__pycache__/**": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/vendor/**": true,
"**/env/**": true,
"**/venv/**": true,
"**/build/**": true,
"env-*": true,
"env.*": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"**/build": true,
"**/docker": true,
"**/venv": true,
"**/vendor": true,
"**/env": true,
"**/.next": true,
"**/.nuxt": true,
"**/public/[abcdefghjklmnopqrstuvwxyz]*": true,
"**/public/i[abcdefghijklmopqrstuvwxyz]*": true,
"storage/framework": true
},
"scss.scannerExclude": [
"**/.git",
"**/.dist",
"**/.next",
"**/.nuxt",
"**/node_modules",
"**/bower_components",
"**/docker",
"**/venv",
"**/vendor"
],
"emmet.triggerExpansionOnTab": false,
"npm.packageManager": "npm",
"npm-intellisense.packageSubfoldersIntellisense": false,
"npm-intellisense.scanDevDependencies": true,
"javascript.updateImportsOnFileMove.enabled": "never",
"javascript.validate.enable": true,
"javascript.referencesCodeLens.enabled": true,
"javascript.implicitProjectConfig.checkJs": false,
"typescript.disableAutomaticTypeAcquisition": false,
"typescript.implementationsCodeLens.enabled": true,
"typescript.referencesCodeLens.enabled": true,
"typescript.check.npmIsInstalled": false,
"typescript.tsserver.log": "verbose",
"typescript.surveys.enabled": false,
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"php.suggest.basic": false,
"php.validate.enable": false,
"simple-php-cs-fixer.save": true,
"prettier.jsxSingleQuote": true,
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.useTabs": false,
"prettier.tabWidth": 2,
"eslint.packageManager": "npm",
"eslint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
},
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"twig": "html"
},
"[javascript]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.wordWrap": "off",
"editor.quickSuggestions": false,
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
"editor.formatOnSave": true
},
"[php]": {
"editor.quickSuggestions": { "comments": true },
"editor.defaultFormatter": "calebporzio.simple-php-cs-fixer",
"editor.formatOnSave": false
},
"[plaintext]": {
"editor.quickSuggestions": false,
"editor.insertSpaces": false,
"files.insertFinalNewline": false,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": false
},
"[nginx]": {
"editor.defaultFormatter": "raynigon.nginx-formatter",
"editor.formatOnSave": false
},
"[blade]": {
"editor.defaultFormatter": "onecentlin.laravel-blade",
"editor.formatOnSave": true
},
// "[csharp]": {
// "editor.defaultFormatter": "Leopotam.csharpfixformat",
// },
"[vue]": { "editor.defaultFormatter": "octref.vetur" },
"[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[yml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[xml]": { "editor.formatOnSave": false },
"faker.locale": "id_ID",
"java.configuration.updateBuildConfiguration": "interactive",
"java.errors.incompleteClasspath.severity": "ignore",
"java.semanticHighlighting.enabled": true,
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
"java.format.settings.profile": "GoogleStyle",
"java.autobuild.enabled": false,
"java.requirements.JDK11Warning": false,
"gradle.autoDetect": "off",
"insertDateString.format": "YYYY-MM-DD hh:mm:ss",
"insertDateString.formatDate": "YYYY-MM-DD",
"insertDateString.formatTime": "hh:mm:ss",
"terminal.integrated.unicodeVersion": "11",
"terminal.integrated.fontFamily": "'Monaco', 'Menlo for Powerline', 'Roboto Mono', 'Consolas'",
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"terminal.external.windowsExec": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"terminal.integrated.shellArgs.windows": ["-NoLogo"],
"terminal.external.osxExec": "Alacritty.app",
"terminal.integrated.shell.osx": "/bin/zsh",
// "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,{
"codesnap.backgroundColor": "",
"codesnap.boxShadow": "",
"codesnap.containerPadding": "",
"codesnap.roundedCorners": true,
"codesnap.showWindowControls": false,
"codesnap.showWindowTitle": false,
"codesnap.showLineNumbers": true,
"codesnap.realLineNumbers": false,
"codesnap.transparentBackground": false,
"todo-tree.highlights.enabled": false,
"todo-tree.tree.showScanModeButton": false,
"todo-tree.tree.flat": true,
"spring.initializr.defaultLanguage": "Java",
"spring.initializr.defaultArtifactId": "demo",
"spring.initializr.defaultGroupId": "dev.altaris",
"spring.initializr.serviceUrl": [ "https://start.spring.io/" ],
"spring.initializr.defaultPackaging": "WAR",
}
# Global gitignore: ~/.gitignore
# ------------------------------
# Common ignored files
# ------------------------------
._*
.cache/
.DS_Store
.DS_Store?
.eslintcache
.grunt
.idea
.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
coverage
Desktop.ini
jspm_packages/
lib-cov
logs
node_modules/
npm-debug.log*
pids
Thumbs.db
typings/
venv/
yarn-debug.log*
yarn-error.log
yarn-error.log*
{
"Working Directory" : "\/Users\/Ariss",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Rows" : 43,
"Ansi 11 Color" : {
"Green Component" : 0.51764708757400513,
"Red Component" : 1,
"Blue Component" : 0
},
"Use Italic Font" : true,
"Foreground Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Use Custom Window Title" : false,
"Right Option Key Sends" : 0,
"Character Encoding" : 4,
"Selection Color" : {
"Green Component" : 0.21176470816135406,
"Red Component" : 0.027450980618596077,
"Blue Component" : 0.25882354378700256
},
"Mouse Reporting" : true,
"Cursor Boost" : 0.130933988764045,
"Ansi 4 Color" : {
"Green Component" : 0.51764708757400513,
"Red Component" : 0,
"Blue Component" : 0.83137255907058716
},
"Non-ASCII Anti Aliased" : true,
"Sync Title" : false,
"Disable Window Resizing" : true,
"Description" : "Default",
"Close Sessions On End" : true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Scrollback Lines" : 1000,
"Hide After Opening" : false,
"Prevent Opening in a Tab" : false,
"Brighten Bold Text" : true,
"Flashing Bell" : false,
"Cursor Guide Color" : {
"Red Component" : 0.70213186740875244,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 0.25,
"Green Component" : 0.9268307089805603
},
"BM Growl" : true,
"Ansi 3 Color" : {
"Green Component" : 0.51764708757400513,
"Red Component" : 1,
"Blue Component" : 0
},
"Use Non-ASCII Font" : false,
"Link Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0.73423302173614502,
"Alpha Component" : 1,
"Green Component" : 0.35916060209274292
},
"Shortcut" : "1",
"Background Image Location" : "",
"Bold Color" : {
"Green Component" : 0.51764708757400513,
"Red Component" : 1,
"Blue Component" : 0
},
"Use Cursor Guide" : false,
"Unlimited Scrollback" : false,
"Custom Command" : "No",
"Title Components" : 3,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Text" : "[1;6A",
"Action" : 10
},
"0x37-0x40000" : {
"Text" : "0x1f",
"Action" : 11
},
"0x32-0x40000" : {
"Text" : "0x00",
"Action" : 11
},
"0xf709-0x20000" : {
"Text" : "[17;2~",
"Action" : 10
},
"0xf70c-0x20000" : {
"Text" : "[20;2~",
"Action" : 10
},
"0xf729-0x20000" : {
"Text" : "[1;2H",
"Action" : 10
},
"0xf72b-0x40000" : {
"Text" : "[1;5F",
"Action" : 10
},
"0xf705-0x20000" : {
"Text" : "[1;2Q",
"Action" : 10
},
"0xf703-0x260000" : {
"Text" : "[1;6C",
"Action" : 10
},
"0xf700-0x220000" : {
"Text" : "[1;2A",
"Action" : 10
},
"0xf701-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x42",
"Action" : 11
},
"0x38-0x40000" : {
"Text" : "0x7f",
"Action" : 11
},
"0x33-0x40000" : {
"Text" : "0x1b",
"Action" : 11
},
"0xf703-0x220000" : {
"Text" : "[1;2C",
"Action" : 10
},
"0xf701-0x240000" : {
"Text" : "[1;5B",
"Action" : 10
},
"0xf70d-0x20000" : {
"Text" : "[21;2~",
"Action" : 10
},
"0xf702-0x260000" : {
"Text" : "[1;6D",
"Action" : 10
},
"0xf729-0x40000" : {
"Text" : "[1;5H",
"Action" : 10
},
"0xf706-0x20000" : {
"Text" : "[1;2R",
"Action" : 10
},
"0x34-0x40000" : {
"Text" : "0x1c",
"Action" : 11
},
"0xf700-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x41",
"Action" : 11
},
"0x2d-0x40000" : {
"Text" : "0x1f",
"Action" : 11
},
"0xf70e-0x20000" : {
"Text" : "[23;2~",
"Action" : 10
},
"0xf702-0x220000" : {
"Text" : "[1;2D",
"Action" : 10
},
"0xf703-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x43",
"Action" : 11
},
"0xf700-0x240000" : {
"Text" : "[1;5A",
"Action" : 10
},
"0xf707-0x20000" : {
"Text" : "[1;2S",
"Action" : 10
},
"0xf70a-0x20000" : {
"Text" : "[18;2~",
"Action" : 10
},
"0x35-0x40000" : {
"Text" : "0x1d",
"Action" : 11
},
"0xf70f-0x20000" : {
"Text" : "[24;2~",
"Action" : 10
},
"0xf703-0x240000" : {
"Text" : "[1;5C",
"Action" : 10
},
"0xf701-0x260000" : {
"Text" : "[1;6B",
"Action" : 10
},
"0xf702-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x44",
"Action" : 11
},
"0xf72b-0x20000" : {
"Text" : "[1;2F",
"Action" : 10
},
"0x36-0x40000" : {
"Text" : "0x1e",
"Action" : 11
},
"0xf708-0x20000" : {
"Text" : "[15;2~",
"Action" : 10
},
"0xf701-0x220000" : {
"Text" : "[1;2B",
"Action" : 10
},
"0xf70b-0x20000" : {
"Text" : "[19;2~",
"Action" : 10
},
"0xf702-0x240000" : {
"Text" : "[1;5D",
"Action" : 10
},
"0xf704-0x20000" : {
"Text" : "[1;2P",
"Action" : 10
}
},
"Ansi 14 Color" : {
"Green Component" : 0.80000001192092896,
"Red Component" : 0.80000001192092896,
"Blue Component" : 1
},
"Ansi 2 Color" : {
"Green Component" : 0.85882353782653809,
"Red Component" : 0.33725491166114807,
"Blue Component" : 0.22745098173618317
},
"Send Code When Idle" : false,
"ASCII Anti Aliased" : true,
"Tags" : [
],
"Ansi 9 Color" : {
"Green Component" : 0.19607843458652496,
"Red Component" : 0.86274510622024536,
"Blue Component" : 0.18431372940540314
},
"Use Bold Font" : true,
"Silence Bell" : false,
"Ansi 12 Color" : {
"Green Component" : 0.51764708757400513,
"Red Component" : 0,
"Blue Component" : 0.83137255907058716
},
"Window Type" : 0,
"Use Bright Bold" : true,
"Cursor Text Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Default Bookmark" : "No",
"Cursor Color" : {
"Green Component" : 0.19607843458652496,
"Red Component" : 0.86274510622024536,
"Blue Component" : 0.18431372940540314
},
"Ansi 1 Color" : {
"Green Component" : 0.19607843458652496,
"Red Component" : 0.86274510622024536,
"Blue Component" : 0.18431372940540314
},
"Name" : "Default",
"Blinking Cursor" : false,
"Guid" : "F399E15E-71FD-4599-B7C6-5B0974FE716A",
"Idle Code" : 0,
"Ansi 10 Color" : {
"Green Component" : 0.85882353782653809,
"Red Component" : 0.33725491166114807,
"Blue Component" : 0.22745098173618317
},
"Ansi 8 Color" : {
"Green Component" : 0.11372549086809158,
"Red Component" : 0.10588235408067703,
"Blue Component" : 0.12941177189350128
},
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.1491314172744751
},
"Smart Cursor Color" : false,
"Ambiguous Double Width" : false,
"Cursor Type" : 0,
"Ansi 0 Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0
},
"Blur" : false,
"Vertical Spacing" : 1,
"Normal Font" : "JetBrainsMono-Regular 14",
"Use Underline Color" : false,
"Ansi 7 Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Space" : 0,
"Command" : "",
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 0,
"Only The Default BG Color Uses Transparency" : false,
"Blink Allowed" : false,
"Minimum Contrast" : 0.23286576704545456,
"Ansi 15 Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Open Toolbelt" : false,
"Ansi 6 Color" : {
"Green Component" : 0.80000001192092896,
"Red Component" : 0.80000001192092896,
"Blue Component" : 1
},
"Transparency" : 0.092851760786802032,
"Initial Text" : "",
"Background Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0
},
"Screen" : -1,
"Initial Use Transparency" : true,
"Non Ascii Font" : "Monaco 14",
"Ansi 13 Color" : {
"Green Component" : 0.16078431904315948,
"Red Component" : 0.71764707565307617,
"Blue Component" : 0.85098040103912354
},
"Use Tab Color" : false,
"Columns" : 179,
"Visual Bell" : true,
"ASCII Ligatures" : true,
"Custom Directory" : "No",
"Ansi 5 Color" : {
"Green Component" : 0.16078431904315948,
"Red Component" : 0.71764707565307617,
"Blue Component" : 0.85098040103912354
}
}
# Remove bloated application
rm -fr "/Applications/GarageBand.app"
rm -fr "/Library/Application Support/GarageBand/"
rm -fr "/Library/Audio/Apple Loops/Apple/"
# Dock: remove workspace auto-switching
# sudo nvram StartupMute=%00
# https://www.defaults-write.com/speed-up-macos-high-sierra/
mkdir -p /Users/Ariss/Pictures/Screenshots
defaults write com.apple.screencapture location /Users/Ariss/Pictures/Screenshots && killall SystemUIServer
defaults write com.apple.finder QuitMenuItem -bool true && killall Finder
defaults write com.apple.dock workspaces-auto-swoosh -bool NO && killall Dock
defaults write com.apple.dock static-only -bool false && killall Dock
# ------------------------------------------------------------------------------------------------------------
# User Environment
# ------------------------------------------------------------------------------------------------------------
# Install brew (xcode first)
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://git.io/pVOl)"
brew doctor && brew update && brew cleanup
# essential packages (oh-my-zsh)
brew install zsh git tree curl wget git curl jenv wifi-password nmap unrar mkcert nss ffmpeg youtube-dl
brew cask install keka iina kap postman multipass
brew tap homebrew/services
mkdir -p ~/.config/certs
# oh-my-zsh
touch ~/.myenv && touch ~/.mytoken && sh -c "$(curl -fsSL https://git.io/JvzfK)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
curl -Ls https://gist.githubusercontent.com/riipandi/2f304a1cbf7615a8f912473b5f4a7cc3/raw/zshrc -o ~/.zshrc
curl -Ls https://git.io/JvzYD -o ~/Downloads/AtelierSulphurpool.itermcolors
curl -Ls https://git.io/JvzYD -o ~/Downloads/Andromeda.itermcolors
curl -Ls https://git.io/JvzY5 -o ~/Downloads/Framer.itermcolors
source ~/.zshrc
# ------------------------------------------------------------------------------------------------------------
# Development Environment
# ------------------------------------------------------------------------------------------------------------
# Set JDK
jenv add $(/usr/libexec/java_home -v11)
jenv add $(/usr/libexec/java_home -v1.8)
jenv enable-plugin maven
jenv enable-plugin gradle
jenv enable-plugin export
jenv versions
# web development
brew install sqlite php composer nginx dnsmasq maven gradle imagemagick graphviz redis memcached pkg-config
brew install node@12
ln -s /usr/local/opt/node@12 /usr/local/opt/node
brew install yarn --ignore-dependencies
curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | node
composer global require hirak/prestissimo laravel/valet laravel/installer phpunit/phpunit
composer global require friendsofphp/php-cs-fixer squizlabs/php_codesniffer
brew services run redis && redis-cli ping
pecl install imagick
pecl install xdebug
pecl install redis
# check php extensions
# open -e /usr/local/etc/php/7.4/php.ini
# /usr/local/etc/php/7.4/conf.d/ext-opcache.ini
php -r "print(class_exists('imagick'));"
php -r "print(class_exists('redis'));"
php -i | grep php.ini
# imagick extension
ls -al $(which pecl)
ls -al $(which pear)
# Manual install composer
# $(brew --prefix php)/bin/php composer.phar install
composer config -g repos.packagist composer https://packagist.phpindonesia.id
# Python by Miniconda
# rm -rf $HOME/Library/Miniconda ~/.condarc ~/.conda ~/.continuum && code ~/.zshrc
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/Downloads/miniconda.sh
bash ~/Downloads/miniconda.sh -p $HOME/Library/Miniconda
conda update conda
# PostgreSQL
brew install postgresql && brew services run postgresql
psql postgres -c "CREATE ROLE postgres; ALTER USER postgres WITH PASSWORD 'secret'"
psql postgres -c "ALTER USER postgres WITH SUPERUSER CREATEROLE CREATEDB LOGIN"
psql postgres -c "\du"
# MariaDB
brew install mariadb && brew services stop mariadb && brew services run mariadb
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'secret'; FLUSH PRIVILEGES;"
mysql -uroot -psecret -e "DROP DATABASE IF EXISTS test; SHOW DATABASES"
# multipass
sudo multipass set local.driver=hyperkit
multipass set client.primary-name=default-vm
multipass set client.gui.autostart=false
# other sdk
brew tap dart-lang/dart && brew install dart go
brew cask install dotnet-sdk
pip install --upgrade pip setuptools
# ------------------------------------------------------------------------------------------------------------
# Mobile Development
# ------------------------------------------------------------------------------------------------------------
# android sdk
mkdir -p ~/SDK/android ; cd $_ ; mkdir -p ~/SDK/android/cmdline-tools
wget -cO platform-tools.zip https://dl.google.com/android/repository/platform-tools_r29.0.6-darwin.zip
wget -cO tools.zip https://dl.google.com/android/repository/commandlinetools-mac-6200805_latest.zip
unzip tools.zip && cp -r tools/ cmdline-tools/latest && rm -f tools.zip
unzip platform-tools.zip && rm -f platform-tools.zip
touch ~/.android/repositories.cfg && sdkmanager
sdkmanager 'system-images;android-28;default;x86_64'
sdkmanager 'platform-tools'
sdkmanager 'build-tools;28.0.3'
sdkmanager 'platforms;android-28'
sdkmanager --update
sdkmanager --licenses
# Flutter development
brew update
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
brew install ios-deploy
brew install bundletool
sudo gem install cocoapods
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license
wget -cO flutter.zip https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.12.13+hotfix.8-stable.zip
unzip flutter.zip && rm -f flutter.zip
flutter doctor --android-licenses
flutter config --no-analytics
flutter doctor
# ------------------------------------------------------------------------------------------------------------
# Miscellaneous
# ------------------------------------------------------------------------------------------------------------
# gCloud SDK
wget -cO ~/Downloads/gcloud.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-282.0.0-darwin-x86_64.tar.gz
tar xzvf ~/Downloads/gcloud.tar.gz -C /usr/local/share && rm ~/Downloads/gcloud.tar.gz
gcloud components install app-engine-java app-engine-php app-engine-python app-engine-python-extras
gcloud components install app-engine-go beta cloud-datastore-emulator cloud-firestore-emulator appctl
gcloud config set disable_usage_reporting false && gcloud components update
gcloud init
gcloud config set compute/zone us-central1-b
gcloud config set compute/region us-central1
gcloud config list
# DNS over HTTPS
sudo brew services stop dnsmasq
brew install dnscrypt-proxy
curl -L# https://git.io/JvgFm -o /usr/local/etc/dnscrypt-proxy.toml
cat > /usr/local/etc/dnsmasq.conf <<EOF
port=53
server=127.0.0.1#5300
conf-dir=/usr/local/etc/dnsmasq.d/,*.conf
EOF
sudo brew services start dnscrypt-proxy
sudo brew services start dnsmasq
# optional packages
# brew install goreleaser snapcraft cloudflared
# brew install aircrack-ng gh reaver vault jetty flyway
# brew cask install virtualbox virtualbox-extension-pack
#!/bin/sh
#------------------------
# PATH Manipulations
#------------------------
# Homebrew fix pkg installed @sbin
export PATH="/usr/local/sbin:$PATH"
# Google Cloud SDK and shell command completion for gcloud:
if [ -f '/usr/local/share/google-cloud-sdk/path.zsh.inc' ]; then
. '/usr/local/share/google-cloud-sdk/path.zsh.inc'
fi
if [ -f '/usr/local/share/google-cloud-sdk/completion.zsh.inc' ]; then
. '/usr/local/share/google-cloud-sdk/completion.zsh.inc'
fi
# Java development environment:
export JAVA_HOME_8=$(/usr/libexec/java_home -v1.8)
export JAVA_HOME_11=$(/usr/libexec/java_home -v11)
# multiple java version, different JDK version
# export JAVA_HOME=$JAVA_HOME_11
# export _PENTAHO_JAVA_HOME=$JAVA_HOME_8
# export _PENTAHO_JAVA="${JAVA_HOME_8}/bin/java"
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
# Golang development:
# export GOPATH="$HOME/Goject"
# export GOVERSION="$(ls -tr /usr/local/Cellar/go | sort | tail -1)"
# export GOROOT="/usr/local/Cellar/go/${GOVERSION}"
# export PATH="$GOPATH/bin:/usr/local/sbin:$PATH"
# Flutter development:
# 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-sdk/bin:$PATH"
# Disable dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_HOME="/usr/local/share/dotnet"
export PATH="$DOTNET_HOME/bin:$PATH"
# PHP + NodeJS development
export GATSBY_TELEMETRY_DISABLED=1
export PATH="/usr/local/opt/node@12/bin:$PATH"
export PATH="$HOME/.composer/vendor/bin:$PATH"
# AirCrack-Ng
export PATH="/usr/local/Cellar/aircrack-ng/1.6/bin:$PATH"
# Python3 from brew
# https://medium.com/faun/pyenv-multi-version-python-development-on-mac-578736fb91aa
export PATH=/usr/local/opt/python/libexec/bin:$PATH
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'
# change_all_extensions old new
# find . -name "*.js" -exec bash -c 'mv "$1" "${1%.t1}".ts' - '{}' \;
#------------------------
# 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
}
# Git Aliases
alias gc="git clone"
alias gcm="git commit -m"
alias gco="git checkout"
alias grv='git remote -v'
alias gpush="git push"
alias gpull="git pull"
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'
#------------------------
# Laravel artisan command
#------------------------
alias phart='php artisan'
alias art-tk='php artisan tinker'
alias art-keygen='php artisan key:generate'
alias art-serve='php artisan serve'
alias art-migrate='php artisan migrate'
alias art-migratef='php artisan migrate:fresh'
alias art-migratefs='php artisan migrate:fresh --seed'
alias art-migraterb='php artisan migrate:rollback'
alias art-seed='php artisan db:seed'
alias art-dummy="php artisan migrate:fresh --seed && php artisan db:seed"
alias art-init='art-keygen && art-migratefs && npmi && npm run dev'
alias art-link='php artisan storage:link'
# art-dummy --class=DummyContentSeeder
#------------------------
# General Aliases
#------------------------
alias c.='code .'
alias mp='multipass'
alias cs='cd ~/Sandbox'
alias css='cd ~/Sandbox/Screencast'
alias cl='history -c && clear'
alias cls='local HISTSIZE=0 && history -c && clear'
alias setdns='brew services start dnscrypt-proxy && networksetup -setdnsservers Wi-Fi 127.0.0.1'
alias resetdns='networksetup -setdnsservers Wi-Fi Empty && brew services stop dnscrypt-proxy'
alias setdnscf='networksetup -setdnsservers Wi-Fi 1.1.1.1 208.67.222.222'
alias setdnsgw='networksetup -setdnsservers Wi-Fi 172.64.36.1 172.64.36.2'
alias getdns='networksetup -getdnsservers Wi-Fi'
alias changerc='code ~/.zshrc'
alias changenv='code ~/.myenv'
alias update='source ~/.zshrc'
alias compi='rm -fr vendor composer.lock && composer install --no-suggest'
alias compu='composer update --no-suggest'
alias compo-cc='composer clearcache'
alias compo-dump='composer dump-autoload'
alias compo-load='composer dump-autoload'
alias compo-gu='composer global update'
alias compo-cp='composer create-project --prefer-dist'
alias compo-cl='composer clearcache'
alias npmi='rm -fr node_modules package-lock.json && npm install --no-optional --no-audit'
alias npmu='npm upgrade && npm install'
alias npmirp='npmi && npm run prod'
alias npmrun='npm run'
alias rkh='rm -f ~/.ssh/known_hosts'
alias vls='valet link && valet secure'
alias vlf='valet forget && valet unsecure'
alias ydl='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'
# 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'
alias bcl='brew cleanup'
alias brewi='brew info'
alias brews='brew search'
alias brewci='brew cask info'
alias svclist='brew services list'
alias svcrun='brew services run'
alias svcstart='brew services start'
alias svcstop='brew services stop'
alias svcrestart='brew services restart'
alias pkg-update='brew update && brew upgrade && brew cask upgrade && brew cleanup'
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'
# Docker command alias
alias dk='docker'
alias dk-stop='docker stop'
alias dk-stop='docker stop --time=20'
alias dkls='docker image list'
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'
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'
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}}"
}
[
{
"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
#------------------------
# ZSH look and feel
#------------------------
export LANG=en_US.UTF-8
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="bira"
CASE_SENSITIVE="false"
HYPHEN_INSENSITIVE="false"
DISABLE_AUTO_UPDATE="false"
DISABLE_UPDATE_PROMPT="false"
DISABLE_AUTO_TITLE="true"
ENABLE_CORRECTION="false"
plugins=(adb composer docker golang gradle mvn nmap npm python sbt sdk spring xcode zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
source $HOME/.mytoken
#------------------------
# Shell Variables
#------------------------
# Specify VS Code as default editor
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='code'
export REACT_EDITOR='code'
else
export EDITOR='nano'
export REACT_EDITOR='nano'
fi
source $HOME/.myenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.