Skip to content

Instantly share code, notes, and snippets.

View saylerb's full-sized avatar

Brian Sayler saylerb

  • Denver, CO
View GitHub Profile
@indiesquidge
indiesquidge / presenter.md
Created April 21, 2015 01:40
Intro to Presenters

Presenters & Decorators

Decorators

Decorators are used to add new functionality to an already existing object by "wrapping" it with new methods, without effecting other instances of that object. Thus, decorators are a perfect example of the Open/closed principle, in which an object is "open for extension" but "closed for modification"; you should be able to add new behavior to application without changing it's underlying source code. If any of this is a bit hard to swallow, I would

@mateusortiz
mateusortiz / apps.sh
Last active May 28, 2020 22:48 — forked from millermedeiros/osx_setup.md
Setup Mac OS X El Capitan.
#!/bin/sh
# homebrew-cask
brew tap phinze/homebrew-cask
brew install brew-cask
# browser
brew cask install firefox-aurora
brew cask install google-chrome
brew cask install google-chrome-canary
@JaredRoth
JaredRoth / Mod1_tools.md
Last active November 13, 2024 16:47
Make Mod 1 a little easier: Using Atom, Terminal, and other tools

Jared

iTerm

  • Get it
  • Preference changes to get certain shortcuts to behave the same as the rest of the system:
  • Preferences -> profiles -> Keys
  • Left option key: +Esc
  • Option-left: Send Escape sequence: b
  • Option-right: Send Escape sequence: f
  • Other settings
  • Transparency

Enums Homework Part 1

Do by April 4.

git clone http://github.com/turingschool/enums-exercises

Do the following in order:

class Dog # class name is a "constant"
# Objects combine:
# -- state (instance variables)
# -- behavior (methods)
def initialize
# first step in the object's lifecycle
# do i have any setup i actually need to do?
@animals_chased = []
end
@nicholasknight
nicholasknight / adv2notes.md
Last active March 25, 2025 16:12
Kinesis Advantage 2 notes

(NOTE: Current and future versions of this and any other Advantage 2-related things I post will be at https://github.com/nicholasknight/adv2keyboard)

I received my Advantage 2 today. There's no full manual yet, even though keyboards are apparently arriving (hint, hint, Kinesis). The quick start guide leaves out the "power user mode", and there are some other quirks.

Update: A manual has been posted at http://www.kinesis-ergo.com/advantage2-resources/

It includes a dictionary for the key maps, but I know it leaves at least one possible key undocumented: it does not list f14, but I have successfully mapped my scrollock to f14 regardless.

It also mentions a firmware version (1.0.18) that doesn't seem to be available yet, with a new feature (status report playback speed).

@ryanflach
ryanflach / rails_setup.md
Last active November 13, 2023 19:49
Common setup for a new Rails project
  1. rails new <project_name> -d postgresql --skip-turbolinks --skip-spring -T
  • -d postgresql sets up the project to use PostgreSQL
  • --skip-turbolinks & --skip-spring creates a project that does not use turbolinks or spring
  • -T skips the creation of the test directory and use of Test::Unit
  1. In the Gemfile:
  • Available to all environments:
    • gem 'figaro' - store environment variables securely across your app (docs)
    • Uncomment gem 'bcrypt', '~> 3.1.7' if you will be hosting your own user accounts with passwords (docs)
  • Inside of group :test:
    • gem 'rspec-rails' - user rspec in place of minitest (docs)

Iterators

What is the difference between forEach and map in JS?

forEach:

const arr = [1, 2, 3];

const eachExample = () => arr.forEach(e => e);
@mairh
mairh / Redux-Form-Semantic-UI-React
Last active August 12, 2021 23:03
Semantic-UI-React form validation using redux-form example
// semantic-ui-form.js
import React from 'react';
import PropTypes from 'prop-types';
import { Form, Input } from 'semantic-ui-react';
export default function semanticFormField ({ input, type, label, placeholder, meta: { touched, error, warning }, as: As = Input, ...props }) {
function handleChange (e, { value }) {
return input.onChange(value);
}