Skip to content

Instantly share code, notes, and snippets.

@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@ftrain
ftrain / actually.js
Last active November 10, 2023 01:16
A program that generates actuallies
/*
actually.js
_ _ _
__ _ __ _ __ _ __ _ ___| |_ _ _ __ _| | |_ _
/ _` |/ _` |/ _` |/ _` |/ __| __| | | |/ _` | | | | | |
| (_| | (_| | (_| | (_| | (__| |_| |_| | (_| | | | |_| |_
\__,_|\__,_|\__,_|\__,_|\___|\__|\__,_|\__,_|_|_|\__, ( )
|___/|/
*/
@razwan
razwan / _baseline.scss
Created April 14, 2014 16:20
Aligning type to baseline the right way with SASS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
@tcmacdonald
tcmacdonald / conditions.js.coffee
Created September 23, 2013 17:40
Conditions provides a simple API for conditional JS behaviors. This allows a developer to show or hide certain sections of a stepped-form based on the user's response in previous sections. For every condition, a session cookie is set providing very basic persistance of control-flow for clients.
# **Conditions** provides a simple API for conditional behaviors within the <a href="/docs/form.js.html">Form</a> class. This allows a developer to show or hide certain sections of a stepped-form based on the user's response in previous sections.
# For every condition, a session cookie is set providing very basic persistance of control-flow for clients.
# ### Usage
# Every action item (button, link) that carries a condition must define the following attributes...
#
# <pre>
# data-condition="#target_selector"
# data-conditional-group="some_group"
@henrahmagix
henrahmagix / button.css
Created December 2, 2012 18:32
Indented button with increased hit area.
.button {
background-color: #EDEDE7;
border: 1px solid #593723;
-moz-box-shadow: 0 10px 0 0 #593723, 0 10px 15px 2px rgba(0, 0, 0, 0.8);
-webkit-box-shadow: 0 10px 0 0 #593723, 0 10px 15px 2px rgba(0, 0, 0, 0.8);
box-shadow: 0 10px 0 0 #593723, 0 10px 15px 2px rgba(0, 0, 0, 0.8);
color: #593723;
display: block;
padding: 10px;
position: relative;
@barelyknown
barelyknown / gist:3692433
Created September 10, 2012 17:42
Send Email From Rails Console
# Simple approach to sending email from the Rails console
# Implementation idea courtesy of Steve Klabnik
# http://blog.steveklabnik.com/posts/2012-09-09-random-ruby-tricks--class-new
# Create the mailer class with a block and assign to a variable
mailer = Class.new(ActionMailer::Base) do
def example_message
mail(to: "[email protected]", from: "[email protected]", subject: "Example Message") do |format|
format.text { render text: "Example message body" }
end
@tcmacdonald
tcmacdonald / .vimrc
Last active October 6, 2015 00:08
.vimrc
set nocompatible " be iMproved
filetype off " required!
call pathogen#infect()
if has("gui_macvim")
" let Vundle manage Vundle
" set rtp+=~/.vim/bundle/vundle/
" call vundle#rc()
" Bundle 'gmarik/vundle'