Skip to content

Instantly share code, notes, and snippets.

// Colt Borg Settings
// Last Updated 6/20/2017
{
// Editor
// Controls the font family.
"editor.fontFamily": "Fira Code",
// Controls the font size.
@coltborg
coltborg / bash_profile
Last active September 17, 2016 15:36
Bash profile using the http://panda.siamak.work/ theme
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi
@coltborg
coltborg / .vimrc
Created October 21, 2016 04:18
vimrc
syntax on
set number
filetype plugin indent on
set tabstop=2 shiftwidth=2 expandtab
set backspace=indent,eol,start
"Set shortcut and symbols for white space
nmap <leader>l :set list!<CR>
set listchars=tab:▸\ ,eol:¬
"From Daniel Miessler
@coltborg
coltborg / settings.json
Created June 2, 2018 16:30
VS Code settings
{
"editor.fontFamily": "Dank Mono",
"editor.fontSize": 14,
"editor.lineNumbers": "relative",
"editor.glyphMargin": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.roundedSelection": true,
"editor.scrollBeyondLastLine": true,
@coltborg
coltborg / settings.json
Created June 2, 2018 16:30
VS Code settings
{
"editor.fontFamily": "Dank Mono",
"editor.fontSize": 14,
"editor.lineNumbers": "relative",
"editor.glyphMargin": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.roundedSelection": true,
"editor.scrollBeyondLastLine": true,
@coltborg
coltborg / workspace-settings.json
Created December 31, 2018 15:31
ESLint format on save for Vue.js using Visual Studio Code.
{
"eslint.enable": true,
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false,
},
"[vue]": {
"editor.formatOnSave": false,
},
"eslint.autoFixOnSave": true,
@coltborg
coltborg / css-basics.md
Last active February 27, 2019 02:50
CSS leason for box model & specificity.

CSS Basics


Agenda

  • Basics
  • The Cascade
  • Specificity
  • Box Model
@coltborg
coltborg / SetupExample.vue
Created December 4, 2019 17:19
Vue 3 Essentials - Setup & reactive references
<template>
<div>Capacity: {{ capacity }}</div>
</template>
<script>
import { ref } from 'vue';
export default {
setup() {
const capacity = ref(3); // Ref is used to wrap a primitive (number) inside of a reactive reference (object)
@coltborg
coltborg / SetupWithMethod.vue
Last active December 6, 2019 01:19
Vue 3 Essentials - Methods
<template>
<div>Capacity: {{ capacity }}</div>
<button @click="increaseCapacity">Increase Capacity</button>
</template>
<script>
import { ref } from "vue";
export default {
setup() {
@coltborg
coltborg / SetupWithComputed.vue
Last active December 6, 2019 01:19
Vue 3 Essentials - Computed properties
<template>
<p>
Spaces left: {{ spacesLeft }} out of {{ capacity }}
</p>
<button @click="increaseCapacity">Increase Capacity</button>
<h2>Attending</h2>
<ul>
<li
v-for="(name, index) in attending"
:key="index"