Skip to content

Instantly share code, notes, and snippets.

@torbensky
torbensky / ReactEventExample.jsx
Created May 31, 2020 15:55
A typical React pattern for handling an event when you need to prevent default
function MyForm(props){
const handleSubmit = (event) => {
if(event){
event.preventDefault()
}
props.onSubmit() // <== This is all I really want to do!!!
}
return <form onSubmit={handleSubmit}>
<!-- ... --->
</form>
@torbensky
torbensky / VueComponentExample.html
Created May 31, 2020 15:20
An example of how components are written using Vue.js
<div id="example">
<!-- using our custom component -->
<my-component></my-component>
</div>
<script>
// Define a new component
Vue.component('my-component', {
data: function () {
return {
@torbensky
torbensky / .vimrc
Last active May 20, 2018 16:26
VIM RC File
set nocompatible " be iMproved, required
filetype off " required
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Use smartcase.
let g:neocomplete#enable_smart_case = 1
@torbensky
torbensky / .zshrc
Last active January 25, 2018 18:57
a zsh configuration
# zsh powerlevel config
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time root_indicator kubecontext history)
@torbensky
torbensky / zsh-learning.md
Last active January 25, 2018 18:36
zsh learning

Installing zsh (ubuntu/mint)

sudo apt-get install zsh

oh-my-zsh

A pretty nice zsh configuration manager. Has some great plugins and useful poweruser features.

Themes