See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| #!/bin/bash | |
| set -e | |
| # insert a line to a file if the line does not already exist | |
| # - first parameter is the file to insert the line | |
| # - second parameter is the line to insert. It'll only be inserted if not already exists | |
| # - third parameter is optional. This will override the search behavior. | |
| # Instead of searching for the line of parameter 2 this term is used. | |
| function insertLineIfNotExists { | |
| FILE=$1 |
| const path = require('path'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
| const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
| const CopyPlugin = require('copy-webpack-plugin'); | |
| const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | |
| const TerserPlugin = require('terser-webpack-plugin'); | |
| const devMode = | |
| process.argv[process.argv.indexOf('--mode') + 1] === 'development'; |
| (function() { | |
| var lastScrollY = 0; | |
| var ticking = false; | |
| var update = function() { | |
| // Add scroll logic | |
| ticking = false; | |
| }; | |
| var requestTick = function() { |
| alias lg="git log --pretty=format:'%h %an, %ar: %s' --graph" | |
| alias nah="git reset --hard && git clean -df" | |
| alias squash="git rebase -i HEAD~2" | |
| alias new="git checkout -b" |
| import { createApp } from 'vue'; | |
| import clickOutside from './directives/clickOutside'; | |
| // Decide on which element to mount the vue application | |
| const vueInitContainer = document.getElementById('app'); | |
| // Collect all illegal tags in <div id="app"> | |
| // that will be used to create the initial app template | |
| // Templates should only be responsible for mapping the state to the UI. | |
| // Avoid placing tags with side-effects in your templates, such as <script> or <style> |
| # Opens a PowerShell instance with elevation, finds the wsl ip without relying on hostname, since ArchWSL and others doesn't have it | |
| # then iterate opening the selected ports | |
| $principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
| if($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
| $remoteport = wsl -- ip -o -4 -json addr list eth0 ` | ConvertFrom-Json ` | %{ $_.addr_info.local } ` | ?{ $_ } | |
| $found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
| if($found) { | |
| $remoteport = $matches[0]; | |
| } else{ |
| $breakpoints: ( | |
| 'default': '', | |
| '2xs': 390px, | |
| 'xs': 480px, | |
| 's': 667px, | |
| 'm': 1024px, | |
| 'l': 1180px, | |
| 'xl': 1600px, | |
| '2xl': 1800px, | |
| ); |