Skip to content

Instantly share code, notes, and snippets.

@dillmo
dillmo / HAML starter template
Last active December 27, 2015 22:59
HAML: Starter template
!!!
%html
%head
%meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}
%title Your Website
%body
@dillmo
dillmo / CSS Reset
Last active December 28, 2015 09:09
CSS: reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
@dillmo
dillmo / SASS mixins for vendor prefixes
Last active May 8, 2018 22:01
SASS: vendor prefix mixins
@mixin vendor-prefix($property, $value)
-webkit-#{$property}: $value
-moz-#{$property}: $value
-ms-#{$property}: #{$value}
-o-#{$property}: #{$value}
#{$property}: #{$value}
@mixin value-vendor-prefix($property, $value)
#{$property}: -webkit-#{$value}
#{$property}: -moz-#{$value}
git ls-files | grep '\.swp$' | xargs git rm
@dillmo
dillmo / Rails Gemfile additions
Created December 13, 2013 19:51
Rails Gemfile additions
group :development do
gem 'rspec-rails'
gem 'capybara'
gem 'guard-rspec'
gem 'guard-livereload'
gem 'guard-bundler'
gem 'guard-migrate'
gem 'compass-rails'
gem 'better_errors'
gem 'binding_of_caller'
@dillmo
dillmo / Rails .gitignore
Created December 13, 2013 19:53
Rails .gitignore
*.rbc
*.sassc
.sass-cache
capybara-*.html
.rspec
.rvmrc
/.bundle
/vendor/bundle
/log/*
/tmp/*
@dillmo
dillmo / random_function_generator.cpp
Last active August 29, 2015 13:56
Random Function Generator
/* Copyright(c) 2014 dillmo
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
*
* A program I made for algebra class. Running this program outputs several
* functions with their respective parent functions. To take advantage of this
* program for studying, it is recommended you run it, then graph the output
* for whichever type of function you are studying.
*/
#include <iostream>
@dillmo
dillmo / gas_particles_calculator.cpp
Last active August 29, 2015 13:56
Calculate the volume or number of particles in a mas using moles
/* Copyright (c) 2014 dillmo
* Licensed under the MIT License(http://opensource.org/licenses/MIT)
*
* A program I made for chemistry class. It calculates how many particles there
* are in a gas in moles, based on its volume in liters.
*/
#include <iostream>
using namespace std;
@dillmo
dillmo / dig_a_hole.lua
Last active August 29, 2015 13:56
A ComputerCraft program to dig a hole of your desired dimensions and place ladders along the way
-- Hole Digger by dillmo --
--[[
This program will dig a hole of your description and place ladders for
you. To begin with, place your mining turtle in the bottom left corner of
your hole. Be sure to place ladders in slot one of your turtle's
inventory and specify configuration variables before beginning.
--]]
-- Configuration --
local current_height = 70 -- The current y value of your turtle. This should be
@dillmo
dillmo / 13.cpp
Created February 21, 2014 01:23
C++ Problem Set 1
/* Homework Set 1 Problem 13 by Dillon Morse
* -----------------------------------------
* An electronics company sells circuit boards at a 40 percent profit. Write a
* program that will calculate the selling price of a circuit board that costs
* $12.67. Display the result on the screen.
*/
#include<iostream>
#include<cmath>
using namespace std;