Skip to content

Instantly share code, notes, and snippets.

set nocompatible " be iMproved
filetype off " required!
if has('win32') || has('win64')
source $VIMRUNTIME/mswin.vim
behave mswin
set rtp+=~/vimfiles/bundle/vundle/
call vundle#rc('$HOME/vimfiles/bundle/')
else
@box-turtle
box-turtle / sample.gitconfig
Created March 30, 2019 14:29
git log format alias
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches
@box-turtle
box-turtle / Abort Controller In Axios
Created January 16, 2019 13:13 — forked from adeelibr/Abort Controller In Axios
Abort Controllers In Axios
import React, { Component } from 'react';
import axios from 'axios';
class Example extends Component {
signal = axios.CancelToken.source();
state = {
isLoading: false,
user: {},
}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Font
:set guifont=Source\ Code\ Pro:h14
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason?
:set laststatus=0
:set noshowmode "don't show --INSERT--
:set noruler "don't show line numbers/column/% junk
@box-turtle
box-turtle / basic_sorting_algorithms.js
Created September 23, 2018 14:35
basic sorting algorithm reference
let arr = [2, 7, 1, 3, 9, 5, 10, 4, 6, 8];
/*
Bubble Sort
Loop through the array comparing each item with the adjacent item.
If the item value is less than the item to the left, swap the two items.
Repeat until you make it through the entire array without swapping any items.
O(n^2) time complexity worst case
@box-turtle
box-turtle / index.html
Created September 15, 2018 14:42 — forked from kentcdodds/index.html
The one true react boilerplate
<body>
<div id="⚛️"></div>
<script src="https://unpkg.com/react@16.0.0/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16.0.0/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
<script type="text/babel">
ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️'))
</script>
</body>
@box-turtle
box-turtle / FormExample.js
Created October 5, 2016 17:04 — forked from jquense/FormExample.js
React Form Example / Live version: http://react-form-example.surge.sh/
import React from 'react'
import Form from 'react-formal'
import {
Alert,
Button,
Col, ControlLabel,
Form as BsForm, FormControl, FormGroup as BsFormGroup,
HelpBlock,
} from 'react-bootstrap'
import {Dropdown} from 'react-bootstrap';
import {SelectList} from 'react-widgets';
const selectData = ['Red', 'Blue', 'Green'];
export default class extends Component {
constructor(props) {
super(props);
this.state = {
@box-turtle
box-turtle / NotficationActionTypes.js
Created November 14, 2015 16:56 — forked from jerairrest/NotficationActionTypes.js
React-toastr Redux Implementation
export const RECEIVE_MESSAGE = 'RECEIVE_MESSAGE';
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')