Skip to content

Instantly share code, notes, and snippets.

@DarinM223
DarinM223 / .vimrc
Last active July 23, 2018 00:40
My Vimrc File
"
" Darin's configuration file for vim/neovim
"
" My relatively minimal vimrc/init.vim file
" Most plugins are mostly simple and don't use too much vim magic
"
" I have lots of custom setups for different languagues like Clojure, Rust,
" and Go, so if you do not use these languages, you might be better off with
" a simpler vimrc.
"
@DarinM223
DarinM223 / .agignore
Created July 28, 2014 23:56
Silver searcher ignore file
/env/
/tmp/
/vendor/
/node_modules/
/bin/
*.exe
*.pyc
*.pdf
*.so
*.swp
@DarinM223
DarinM223 / .gitignore_global
Created August 15, 2014 19:27
Global gitignore configuration
# Compiled source #
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
*.7z
@DarinM223
DarinM223 / test.ml
Last active August 29, 2015 14:08
mocaml interpreter tests
(* A simple test harness for the MOCaml interpreter. *)
(* put your tests here:
each test is a pair of a MOCaml declaration and the expected
result, both expressed as strings.
use the string "dynamic type error" if a DynamicTypeError is expected to be raised.
use the string "match failure" if a MatchFailure is expected to be raised.
use the string "implement me" if an ImplementMe exception is expected to be raised
call the function runtests() to run these tests
@DarinM223
DarinM223 / github.vim
Created December 12, 2014 08:14
github.vim
" Vim color file
"
" Author: Anthony Carapetis <[email protected]>
"
" Note: Based on github's syntax highlighting theme
" Used Brian Mock's darkspectrum as a starting point/template
" Thanks to Ryan Heath for an easy list of some of the colours:
" http://rpheath.com/posts/356-github-theme-for-syntax-gem
hi clear
@DarinM223
DarinM223 / .emacs
Last active August 29, 2015 14:14
Emacs init file
(when (>= emacs-major-version 24)
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
)
; Packages installed:
; evil
; ensime
; linum-relative
@DarinM223
DarinM223 / profiling.md
Last active December 4, 2015 20:48
Profiling Golang apps

Profiling Go Apps

One of the great things about Go is that you can easily profile your code to find and optimize bottlenecks. Here are the steps that I went through to profile my Go apps.

Write Benchmark

// Inside test file
@DarinM223
DarinM223 / sample.yaml
Created November 6, 2015 09:02
Sample
---
# Conditions:
# 'enemy_pokemon': gets the current enemy pokemon
# 'your_pokemon': gets your current pokemon
# 'self': gets the move
# you can call properties on these ones
# enemy_pokemon[stats[hp]] gets the enemy_pokemon stat's hp
#
# Statements:
@DarinM223
DarinM223 / Concepts.md
Last active December 18, 2024 07:14
Rust concept explanations

My explanation of the main concepts in Rust

There are three main concepts with Rust:

  1. Ownership (only one variable "owns" the data at one time, and the owner is in charge of deallocating)
  2. Borrowing (you can borrow a reference to an owned variable)
  3. Lifetimes (all data keeps track of when it will be destroyed)

These are fairly simple concepts, but they are often counter-intuitive to concepts in other languages, so I wanted to give a shot at

@DarinM223
DarinM223 / 010716.md
Last active May 6, 2018 23:10
ENGR 183EW

ENGR 183EW Discussion 1

  1. One submission that is supposed to be a complete paper but a draft
  2. A full paper

Preliminary steps on team project:

Work breakdown on topics to cover