Skip to content

Instantly share code, notes, and snippets.

@riipandi riipandi/.editorconfig
Last active Nov 2, 2019

Embed
What would you like to do?
Personal Development Environment Setup
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{js,json,vue,yml,yaml}]
indent_size = 2
[*.md]
max_line_length = off
trim_trailing_whitespace = false

Personal Development Environment Setup

Don't forget to add %LOCALAPPDATA%\Yarn\bin to your PATH if you are using Yarn instead NPM.

# Composer + NPM Packages
composer global require hirak/prestissimo laravel/installer laravel/envoy
npm i -g git-upload degit vsce serve json-server express express-generator 
npm i -g @cloudflare/wrangler eslint eslint-plugin-vue eslint-plugin-react
npm i -g @vue/cli firebase-tools now cloudflare-cli

# Git config
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

# NPM config
npm config set init.author.name  "Aris Ripandi"
npm config set init.author.email "aris@ripandi.id"
npm config set init.author.url "github.com/riipandi"
npm config set init.license "Apache-2.0"

# Essential
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension redhat.vscode-xml
code --install-extension Gruntfuggly.todo-tree
code --install-extension PKief.material-icon-theme
code --install-extension wesbos.theme-cobalt2
code --install-extension idleberg.hopscotch
code --install-extension alefragnani.project-manager
code --install-extension EditorConfig.EditorConfig
code --install-extension formulahendry.auto-close-tag
code --install-extension formulahendry.auto-rename-tag
code --install-extension BriteSnow.vscode-toggle-quotes
code --install-extension CoenraadS.bracket-pair-colorizer
code --install-extension vincaslt.highlight-matching-tag
code --install-extension bibhasdn.random-string-password-generator
code --install-extension clarkyu.vscode-sql-beautify
code --install-extension codezombiech.gitignore
code --install-extension deerawan.vscode-faker
code --install-extension mrmlnc.vscode-apache
code --install-extension shanoor.vscode-nginx
code --install-extension mikestead.dotenv
code --install-extension mechatroner.rainbow-csv
code --install-extension aaron-bond.better-comments
code --install-extension wwm.better-align
code --install-extension quicktype.quicktype
code --install-extension ms-azure-devops.azure-pipelines
code --install-extension coolbear.systemd-unit-file
code --install-extension esbenp.prettier-vscode
code --install-extension sleistner.vscode-fileutils
dcode --install-extension jock.svg
code --install-extension yzhang.markdown-all-in-one
code --install-extension bierner.markdown-preview-github-styles

# PHP, Python, Javascript Development
code --install-extension planbcoding.vscode-react-refactor
code --install-extension xabikos.javascriptsnippets
code --install-extension christian-kohler.npm-intellisense
code --install-extension wix.vscode-import-cost
code --install-extension eg2.vscode-npm-script
code --install-extension dbaeumer.vscode-eslint
code --install-extension ChakrounAnas.turbo-console-log
code --install-extension octref.vetur
code --install-extension xabikos.ReactSnippets
code --install-extension xabikos.JavaScriptSnippets
code --install-extension sdras.vue-vscode-snippets
code --install-extension Zignd.html-css-class-completion
code --install-extension EQuimper.react-native-react-redux
code --install-extension mgmcdermott.vscode-language-babel
code --install-extension bradlc.vscode-tailwindcss
code --install-extension luongnd.edge
code --install-extension junstyle.php-cs-fixer
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension amiralizadeh9480.laravel-extra-intellisense
code --install-extension austenc.laravel-blade-spacer
code --install-extension onecentlin.laravel5-snippets
code --install-extension ahinkle.laravel-model-snippets
code --install-extension onecentlin.laravel-blade
code --install-extension tiansin.vscode-laravel-assist
code --install-extension cstrap.flask-snippets
code --install-extension njpwerner.autodocstring
code --install-extension shardulm94.trailing-spaces

# Optional
code --install-extension pnp.polacode
code --install-extension idleberg.innosetup
code --install-extension Dart-Code.flutter
code --install-extension PeterJausovec.vscode-docker
code --install-extension mauve.terraform
code --install-extension ms-vscode.csharp
code --install-extension ms-python.python
code --install-extension ms-vscode.Go
# gClud SDK Region
gcloud config set compute/zone us-central1-b
gcloud config set compute/region us-central1
gcloud config list
module.exports = {
config: {
updateChannel: 'stable',
opacity: 0.98,
fontSize: 13,
fontFamily: '"Cascadia Code", "Operator Mono", "Fira Code", "Ubuntu Mono", consolas',
fontWeight: 'normal',
fontWeightBold: 'normal',
cursorColor: 'rgba(248,28,229,0.8)',
cursorAccentColor: '#000',
cursorShape: 'BLOCK',
cursorBlink: true,
foregroundColor: 'rgba(141, 208, 6, 0.93)',
backgroundColor: 'rgba(0, 0, 0, .65)',
selectionColor: 'rgba(255, 255, 255,0.3)',
borderColor: 'rgba(255, 255, 255, .15)',
css: "",
termCSS: "",
showHamburgerMenu: true,
showWindowControls: "",
windowSize: [940, 620],
padding: '12px 14px',
bell: false,
copyOnSelect: true,
defaultSSHApp: false,
shell: 'C:\\Program Files\\PowerShell\\6\\pwsh.exe',
shellArgs: ['-NoLogo', '-WorkingDirectory', 'D:\\Sandbox'],
// shell: 'C:\\Windows\\System32\\cmd.exe',
// shellArgs: ['--login', '-i', '/c ubuntu1804'],
hyperBorder: {
borderColors: ['#FF2C70', '#6937FF'],
borderWidth: '2px',
borderRadiusInner: '6px',
borderRadiusOuter: '6px',
}
},
plugins: [
'shades-of-purple-hyper',
'hyper-single-instance',
'hyper-font-smoothing',
'hyper-broadcast',
'hyper-opacity',
'hyperborder',
],
};
{
"globals" :
{
"alwaysShowTabs" : true,
"initialCols" : 110,
"initialRows" : 32,
"requestedTheme" : "dark",
"showTabsInTitlebar" : true,
"showTerminalTitleInTitlebar" : true,
"wordDelimiters" : " ./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}~?\u2502"
},
"profiles" :
[
{
"acrylicOpacity" : 0.000088,
"background" : "#012456",
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "pwsh.exe -NoLogo -WorkingDirectory D:\\Sandbox\\",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 11,
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name" : "PowerShell Core",
"padding" : "10, 10, 10, 10",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
},
{
"acrylicOpacity" : 0.000088,
"closeOnExit" : true,
"colorScheme" : "One Half Dark",
"commandline" : "cmd.exe /K cd /d D:\\Webdir\\",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 12,
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
"name" : "Command Prompt",
"padding" : "10, -10, 10, 10",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
},
{
"acrylicOpacity" : 0.000088,
"closeOnExit" : false,
"colorScheme" : "Solarized Dark",
"commandline" : "Azure",
"connectionType" : "{d9fcfdfa-a479-412c-83b7-c5640e61cd62}",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{b453ae62-4e3d-5e58-b989-0a998ec441b8}.png",
"name" : "Azure Cloud Shell",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
},
{
"acrylicOpacity" : 0.000088,
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "wsl.exe -d Ubuntu-18.04",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 11,
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
"name" : "Ubuntu 18.04 LTS",
"padding" : "10, 10, 10, 10",
"snapOnInput" : true,
"useAcrylic" : false
}
]
}
{
"php-cs-fixer.executablePath": "${extensionPath}\\php-cs-fixer.phar",
// "innosetup.pathToIscc": "C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe",
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
"terminal.external.windowsExec": "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
"terminal.external.osxExec": "Terminal.app",
"terminal.integrated.shell.osx": "/usr/local/bin/pwsh",
"terminal.integrated.shellArgs.osx": [ "-NoLogo" ],
"terminal.integrated.shellArgs.windows": [ "-NoLogo" ],
"terminal.integrated.windowsEnableConpty": true,
"terminal.integrated.macOptionIsMeta": true,
"terminal.integrated.cursorStyle": "underline",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.rendererType": "dom",
"terminal.integrated.fontWeight": "100",
"terminal.integrated.fontSize": 13,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"update.mode": "manual",
"workbench.iconTheme": "material-icon-theme",
// "Hopscotch (TextMate Theme)" / "Cobalt2"
"workbench.colorTheme": "Hopscotch (TextMate Theme)",
"workbench.activityBar.visible": true,
"workbench.startupEditor": "newUntitledFile",
"workbench.enableExperiments": false,
"workbench.tips.enabled": false,
"workbench.editor.enablePreview": true,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.focusRecentEditorAfterClose": true,
"workbench.editor.highlightModifiedTabs": true,
"workbench.sideBar.location": "right",
"workbench.settings.editor": "json",
"workbench.settings.openDefaultSettings": false,
"workbench.settings.useSplitJSON": false,
"workbench.settings.enableNaturalLanguageSearch": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.fontFamily": "'Cascadia Code', 'Fira Code', 'SF Mono', 'Roboto Mono', 'Consolas'",
"editor.fontWeight": "300",
"editor.fontLigatures": true,
"editor.fontSize": 15,
"editor.suggestSelection": "first",
"editor.formatOnSave": false,
"editor.formatOnSaveTimeout": 5000,
"editor.colorDecorators": true,
"editor.cursorBlinking": "phase",
"editor.cursorSmoothCaretAnimation": true,
"editor.mouseWheelZoom": false,
"editor.renderControlCharacters": false,
"editor.renderIndentGuides": false,
"editor.roundedSelection": true,
"editor.scrollBeyondLastLine": false,
"editor.accessibilitySupport": "off",
"editor.snippetSuggestions": "top",
"editor.tabCompletion": "on",
"editor.renderWhitespace": "boundary",
"editor.glyphMargin": true,
"editor.lineHeight": 0,
"editor.letterSpacing": 0.1,
"editor.cursorWidth": 2,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.wordWrap": "off",
"editor.detectIndentation": false,
"editor.autoIndent": false,
"editor.links": false,
"editor.smoothScrolling": true,
"editor.find.autoFindInSelection": false,
"editor.minimap.enabled": false,
"editor.minimap.maxColumn": 200,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.quickSuggestionsDelay": 100,
"editor.parameterHints.enabled": false,
"editor.dragAndDrop": false,
"editor.autoSurround": "never",
"editor.multiCursorModifier": "alt",
"editor.codeActionsOnSave": { "source.fixAll": true },
"zenMode.centerLayout": false,
"zenMode.fullScreen": false,
"zenMode.hideLineNumbers": false,
"zenMode.hideTabs": false,
"breadcrumbs.enabled": false,
"problems.decorations.enabled": false,
"window.newWindowDimensions": "default",
"window.title": "${activeEditorMedium}${separator}",
"window.zoomLevel": 0,
"explorer.sortOrder": "default",
"update.enableWindowsBackgroundUpdates": false,
"update.showReleaseNotes": false,
"extensions.ignoreRecommendations": true,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"explorer.autoReveal": false,
"explorer.openEditors.visible": 0,
"explorer.decorations.badges": false,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.eol": "\n",
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.ignoreMissingGitWarning": true,
"material-icon-theme.showWelcomeMessage": false,
"material-icon-theme.showUpdateMessage": false,
"markdown.extension.toc.githubCompatibility": true,
"files.autoSave": "off",
"files.associations": {
".prettierrc": "yaml",
"*.css": "sass",
"*.erb": "erb",
"*.jsx": "javascriptreact",
"**/ci/*.yml": "azure-pipelines",
"*.vue": "vue"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/.tmb": true,
"**/.venv": true,
"**/*.pyc": true,
"**/.vscode": false,
"**/.quarantine": true,
"**/.firebase": true,
"**/CVS": true,
"**/venv": true,
"**/artisan": true,
"**/__pycache__": true,
"**/composer.lock": true,
"**/package-lock.json": true,
"**/mix-manifest.json": true,
"**/phpunit-log-*.php": true,
"**/yarn.lock": true,
"**/yarn-error.log": true,
"**/docker": true,
"**/node_modules": false,
"**/vendor": false,
"**/.pytest_cache": true,
"venv": true,
"env*": true
},
"files.watcherExclude": {
"**/__pycache__/**": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/vendor/**": true,
"**/env/**": true,
"**/venv/**": true,
"env-*": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/vendor": true,
"**/docker": true,
"**/venv": true,
"**/env": true,
"**/.next": true,
"**/.nuxt": true
},
"highlight-matching-tag.styles": {
"opening": {
"full": {
"highlight": "rgba(165, 153, 233, 0.3)"
}
}
},
"auto-rename-tag.activationOnLanguage": [ "html", "xml", "php", "blade", "edge", "javascript" ],
"importCost.largePackageColor": "#EC3A37F5",
"importCost.mediumPackageColor": "#B362FF",
"importCost.smallPackageColor": "#B362FF",
"emmet.triggerExpansionOnTab": false,
"npm.runInTerminal": true,
"npm-intellisense.packageSubfoldersIntellisense": true,
"npm-intellisense.scanDevDependencies": true,
"javascript.validate.enable": true,
"javascript.referencesCodeLens.enabled": true,
"javascript.implicitProjectConfig.checkJs": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"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,
"php-cs-fixer.onsave": true,
"php-cs-fixer.formatHtml": false,
"php-cs-fixer.rules": "@PhpCsFixer",
"php-cs-fixer.exclude": [],
"projectManager.sortList": "Name",
"blade.format.enable": true,
"faker.locale": "id_ID",
"prettier.jsxSingleQuote": true,
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.useTabs": true,
"prettier.tabWidth": 2,
"eslint.packageManager": "npm",
"eslint.enable": true,
"eslint.autoFixOnSave": true,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
}
],
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"edge": "html",
"twig": "html"
},
"[blade]": {
"editor.formatOnSave": false,
},
"[javascript]": {
"editor.acceptSuggestionOnEnter": "on",
"editor.suggestSelection": "recentlyUsedByPrefix",
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.fontWeight": "300",
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.fontWeight": "300",
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[php]": {
"editor.quickSuggestions": { "comments": true },
"editor.defaultFormatter": "junstyle.php-cs-fixer",
"editor.formatOnSave": true
},
"[plaintext]": {
"editor.quickSuggestions": false,
"editor.insertSpaces": false,
"files.insertFinalNewline": false,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": false,
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur",
},
"[yaml]": {
"editor.defaultFormatter": "ms-azure-devops.azure-pipelines",
},
"[xml]": {
"editor.formatOnSave": false
},
"intelephense.files.exclude": [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/vendor/**/{Test,test,Tests,tests}/**/*Test.php"
],
"pascal.format.indent": 2,
"pascal.format.wrapLineLength": 80,
"todo-tree.highlights.enabled": false,
// "dart.checkForSdkUpdates": false,
// "python.jediEnabled": false,
}

Environment PATH Linux/MacOS

export ANDROID_HOME=$HOME/SDK/android
export ANDROID_PATH=$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
export FLUTTER_PATH=$HOME/SDK/flutter/bin
export PATH=$ANDROID_PATH:$FLUTTER_PATH:$PATH

Environment PATH Windows

ANDROID_HOME : D:\SDK\android
ANDROID_PATH : %ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-tools
FLUTTER_PATH : D:\SDK\flutter\bin
ENVIRON_PATH : %ANDROID_PATH%;%FLUTTER_PATH%

Setup MacOS

brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
brew install ios-deploy

sudo xcodebuild -license
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Android SDK

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

Flutter SDK

flutter config --no-analytics
flutter doctor --android-licenses
flutter doctor
#!/bin/bash
#
# Auto installation, run as root:
#
# bash <(curl -sLo- https://git.io/JeZbn || wget -qO- https://git.io/JeZbn)
#
# Exclude this path in Windows Defender:
# %USERPROFILE%\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4
#
perl -pi -e 's#(.*sudo.*ALL=)(.*)#${1}(ALL) NOPASSWD:ALL#' /etc/sudoers
cat > /etc/apt/sources.list <<EOF
deb http://cloudfront.debian.net/debian buster main contrib non-free
deb http://cloudfront.debian.net/debian buster-updates main contrib non-free
deb http://cloudfront.debian.net/debian-security buster/updates main contrib non-free
EOF
apt update ; apt -y full-upgrade ; apt -y autoremove ; apt -y install git wget curl perl pv \
lsb-release apt-transport-https openssl crudini elinks pwgen software-properties-common lsof \
dirmngr gnupg debconf-utils figlet gcc make cmake build-essential ca-certificates binutils \
dnsutils zip unzip bsdtar whois rsync dh-autoreconf screenfetch jpegoptim optipng jq \
sqlite3 mcrypt gettext imagemagick aspell graphviz sshpass xsel ansible python3 python3-dev \
python3-wheel python3-pip python3-setuptools python3-mysqldb python3-venv python3-psycopg2 \
python3-virtualenv virtualenv libpq-dev apache2-utils php-cli php-common php-curl php-bcmath \
php-gd php-gmp php-imap php-intl php-json php-mbstring php-mysql php-pgsql php-soap php-amqp \
php-amqplib php-sqlite3 php-readline php-xml php-xmlrpc php-zip php-xdebug php-mongodb composer \
mariadb-client zsh zsh-syntax-highlighting
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
echo 'deb https://deb.nodesource.com/node_10.x buster main' > /etc/apt/sources.list.d/nodejs.list
apt update ; apt -y full-upgrade ; apt -y install nodejs
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.7 2 >/dev/null 2>&1
update-alternatives --set python /usr/bin/python3.7 >/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 global require hirak/prestissimo laravel/installer'
runuser -l $USER -c 'sudo npm i -g git-upload degit release serve vsce json-server now'
runuser -l $USER -c 'sudo npm i -g eslint eslint-plugin-vue eslint-plugin-react @vue/cli'
runuser -l $USER -c 'sudo npm i -g express express-generator firebase-tools parcel-bundler'
mkdir -p /home/$USER/.ssh ; chmod 0700 $_
touch /home/$USER/.ssh/{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 Setup
# runuser -l $USER -c 'sh -c "$(curl -fsSL https://git.io/v05qA)"'
# curl -sL https://git.io/fjd1J -o /home/$USER/.zshrc
# chown $USER: /home/$USER/.zshrc
# chsh -s `which zsh` $USER
#!/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
#
perl -pi -e 's#(.*sudo.*ALL=)(.*)#${1}(ALL) NOPASSWD:ALL#' /etc/sudoers
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
cat > /etc/apt/sources.list <<EOF
deb https://mirror.unpad.ac.id/ubuntu `lsb_release -cs` main restricted universe multiverse
deb https://mirror.unpad.ac.id/ubuntu `lsb_release -cs`-updates main restricted universe multiverse
deb https://mirror.unpad.ac.id/ubuntu `lsb_release -cs`-security main restricted universe multiverse
deb https://mirror.unpad.ac.id/ubuntu `lsb_release -cs`-proposed main restricted universe multiverse
EOF
apt update ; apt -y full-upgrade ; apt -y autoremove ; apt -y install git curl perl openssl \
crudini figlet elinks pwgen software-properties-common apt-transport-https dirmngr gnupg jq \
debconf-utils gcc make cmake build-essential binutils dnsutils zip unzip bsdtar pv lsof whois \
dh-autoreconf rsync screenfetch jpegoptim optipng ca-certificates s3cmd sqlite3 mcrypt gettext \
imagemagick aspell graphviz sshpass xsel ansible python3 python3-dev python3-wheel python3-pip \
python3-setuptools python3-postgresql python3-mysqldb python3-venv python3-psycopg2 virtualenv \
python3-virtualenv libpq-dev apache2-utils php-cli php-common php-curl php-bcmath php-gd php-gmp \
php-imap php-intl php-json php-mbstring php-mysql php-pgsql php-soap php-sqlite3 php-readline \
php-xml php-xmlrpc php-zip php-xdebug php-mongodb php-amqp php-amqplib composer mysql-client \
zsh zsh-syntax-highlighting
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
echo "deb https://deb.nodesource.com/node_10.x $(lsb_release -cs) main" > /etc/apt/sources.list.d/nodejs.list
apt update ; apt -y full-upgrade ; apt -y install nodejs
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 global require hirak/prestissimo laravel/installer'
runuser -l $USER -c 'sudo npm i -g git-upload degit release serve vsce json-server now'
runuser -l $USER -c 'sudo npm i -g eslint eslint-plugin-vue eslint-plugin-react @vue/cli'
runuser -l $USER -c 'sudo npm i -g express express-generator firebase-tools parcel-bundler'
mkdir -p /home/$USER/.ssh ; chmod 0700 $_
touch /home/$USER/.ssh/{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 Setup
# runuser -l $USER -c 'sh -c "$(curl -fsSL https://git.io/v05qA)"'
# curl -sL https://git.io/fjd1J -o /home/$USER/.zshrc
# chown $USER: /home/$USER/.zshrc
# chsh -s `which zsh` $USER
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$HOME/.composer/vendor/bin:$PATH
export PATH=$HOME/.config/composer/vendor/bin:$HOME/.yarn/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bira"
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="false"
# Uncomment the following line to change how often to auto-update (in days).
export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="false"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git git-extras git-flow colorize github pip python npm docker bower node sudo supervisor)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Force reset and pull git repo
alias grp="git reset --hard HEAD && git pull"
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.