Skip to content

Instantly share code, notes, and snippets.

View supairish's full-sized avatar
🏂
Shreddin

Chris Irish supairish

🏂
Shreddin
View GitHub Profile
@r00k
r00k / a2.md
Last active November 23, 2015 19:13
Quizzy Question 3
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@LeZuse
LeZuse / macos-setup.md
Last active January 15, 2024 14:40
macOS Machine Setup

Mac OS Dev Machine Setup

General

For latest settings refer to this comment

For previous settings check this Gist revisions

Remarks

  • always read and follow Homebrew formulae installation instructions
@jamesarosen
jamesarosen / upgrading.md
Last active September 29, 2015 13:45
Upgrading to Ember-CLI 0.2.0

I upgraded a small app from ember-cli from 0.1.11 to 0.2.0 today. It took a couple hours. Here are some notes.

Prep

First, I read the release notes.

ember init

I recommend committing your changes right before running ember init. That way, you can accept all the overwrites and easily discard the ones you don't want. kellyselden maintains a repo called ember-cli-output that tracks the changes in what ember init generates over time. You can find the v0.2.0 changes here.

@pixeltrix
pixeltrix / message_encryptor.rb
Created January 26, 2015 00:56
Action Mailer interceptor for encrypting emails using S/MIME
require 'openssl'
class MessageEncryptor
class << self
include OpenSSL
def delivering_email(message)
encrypted_message = sign_and_encrypt(message.encoded, message.to)
overwrite_body(message, encrypted_message)
overwrite_headers(message, encrypted_message)
@davetapley
davetapley / pending_fail.rb
Created January 23, 2015 18:01
Pending failing rspec tests
#!/usr/bin/ruby
require 'pty'
cmd = ARGV.first
begin
PTY.spawn( cmd ) do |stdin, stdout, pid|
begin
stdin.each do |line|
@aldreth
aldreth / bootstrap_select_helper.rb
Last active July 2, 2021 02:29
Helper to select a bootstrap-select (http://silviomoreto.github.io/bootstrap-select/) custom select in cucumber & capybara.
module BootstrapSelectHelper
def bootstrap_select(value, attrs)
# Example
# bootstrap_select(@user.full_name, :from => 'task_user_id')
id = attrs[:from]
find(".selectpicker[data-id='#{id}']").click
find('.inner.selectpicker li', text: value).click
end
end
@deekayen
deekayen / brewStack.md
Last active August 9, 2017 15:23 — forked from shrop/brewStack.md
Localhost Drupal environment setup with Homebrew on Mac OS X

brewStack update for fresh install

Install steps:

  • Install Homebrew:

      $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      $ brew update
      $ brew install git  
    
@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
// {{ radio-button name='dish' value='spam' groupValue=selectedDish selectedAction='testAction' }} Spam
// {{ radio-button name='dish' value='eggs' groupValue=selectedDish }} Eggs
//
/*
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
type: 'radio',
attributeBindings: [ 'checked', 'name', 'type', 'value' ],