go build -buildmode=c-shared -o sum.so sum.go
ruby link.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##based on Mesosphere Marathon's servicerouter.py haproxy config | |
global | |
daemon | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
maxconn 4096 | |
tune.ssl.default-dh-param 2048 | |
defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jeff Atwood, @codinghorror, “Please Don't Learn to Code" blog.codinghorror.com/please-dont-learn-to-code | |
Zed Shaw, @zedshaw, ”Please Don't Become Anything, Especially Not a Programmer" http://learncodethehardway.org/blog/MAY_15_2012.html | |
Stephanie Morillo, @radiomorillo, RubyWanKenoobie.tumblr.com, alterconf.com/speakers/stephanie-morillo | |
Sarah Mei, @sarahmei, http://www.sarahmei.com/blog/2014/07/15/programming-is-not-math/ | |
Sara Simon, @sarambsimon, “Seven Months Later”, blog.turing.io/2015/01/29/seven-months-later/ | |
Kylie Stradley, @kyfast, “Amelia Bedelia Learns to Code”, http://railsconf.com/program#prop_1010 | |
Sasha Laundy, @SashaLaundy, “Your Brain's API: Giving and Getting Technical Help”, https://www.youtube.com/watch?v=hY14Er6JX2s | |
Monica F. Cox, Ph.D., @monicafcox, “Professionally Prepared but Not Pioneer Prepared”, alterconf.com/speakers/monica-f-cox | |
Ashley Nelson-Hornstein, @ashleynh, “On Heroes”, blog.ashleynh.me/on-heroes | |
Dominic M. Liddel, @dominicmliddell, “Lessons Learned While Working to Build B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multiple inheritance with Modules as an alternative to injected composition | |
# from Sandi Metz's talk [Nothing is Something](http://confreaks.tv/videos/bathruby2015-nothing-is-something) | |
# Like Sandi's 'direct' DI method this has behavior outside of the base class | |
# that gets composed together. However in this gist I compose modules in class | |
# definitions instead of injecting collaborators. | |
# Tradeoffs between this and Sandi's version are that in this case the API consumer doesn't | |
# have to know how to make a RandomEchoHouse (no `house = House.new(formatter: Whatever.new)`), | |
# but also the API consumer can't make anything not already accounted for either. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'thin' | |
gem 'rails', '4.2.0' | |
gem 'sqlite3' | |
gem 'sass-rails', '~> 5.0' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.1.0' | |
gem 'jquery-rails' | |
gem 'turbolinks' |
You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:
var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }
console.log(getN()); // 5
setN(10);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MODEL | |
class Case < ActiveRecord::Base | |
include Eventable | |
has_many :tasks | |
concerning :Assignment do | |
def assign_to(new_owner:, details:) | |
transaction do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running https://yourssldomain.com | |
# generate keys, run in ~/.sslcert | |
openssl genrsa -des3 -out server.orig.key 2048 | |
openssl rsa -in server.orig.key -out server.key | |
openssl req -new -key server.key -out server.csr | |
# set Common Name: yourssldomain.com | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
echo "127.0.0.1 yourssldomain.com" | sudo tee -a /private/etc/hosts |
Just OK
link_to(person.name, person_path(person), "data-thing" => 1, "data-other-thing" => true)
↓
<a data-other-thing="true" data-thing="1" href="/people/127326141-david-heinemeier">David Heinemeier Hansson</a>
Awesome!
NewerOlder