- Requests hitting the same load balancer can't handle HTTP and HTTPS at the same time because of SSL issues
- If you are trying to access an outside resource behind a firewall, you have to tell them every time you get a new webserver so they can whitelist the new IP
- If you know the IPs of your web servers and database servers, you can have requests hit these directly and bypass the load balancers.
- Could buy your own data center, but then you have to buy a load balancing router. Those are fucking expensive (tens or hundreds of thousands of dollars)
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
_______________________________________ | |
/ One of the most striking differences \ | |
| between a cat and a lie is that a cat | | |
| has only nine lives. | | |
| | | |
| -- Mark Twain, "Pudd'nhead Wilson's | | |
\ Calendar" / | |
--------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ |
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
User.has_many :memberships | |
User.has_many :groups, :through => :memberships | |
Membership.belongs_to :user | |
Membership.belongs_to :group | |
Group.has_many :memberships | |
Group.has_many :users, :through => :memberships | |
>> current_user.memberships # => Gives you the Join models. No idea why you'd need them, but there they are |
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
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin` | |
# Be sure to have rails and thin installed. | |
require "rubygems" | |
# We are not loading Active Record, nor the Assets Pipeline, etc. | |
# This could also be in your Gemfile. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
# The following lines should come as no surprise. Except by |
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
├── app | |
│ ├── assets | |
│ │ ├── images | |
│ │ │ └── test-plugin | |
│ │ ├── javascripts | |
│ │ │ └── test-plugin | |
│ │ │ └── application.js | |
│ │ └── stylesheets | |
│ │ └── test-plugin | |
│ │ └── application.css |
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
#!/usr/bin/env ruby | |
# giftube – Generates an animated gif from a YouTube url. | |
# | |
# Usage: | |
# | |
# giftube [youtube url] [minute:second] [duration] | |
# | |
# ex. | |
# |
This is a really weird email that I received on April 1st, 2012 from an unknown sender 233558938299@dysgo.org. The email passed by Google's spam filters and found its way directly into my inbox. At first, I thought it was an elaborate April Fool's Day prank. Maybe it is. However, a tiny bit of research into the email address shows that people believe this to be a mass email sent periodically by a paranoid schizophrenic man from Japan. The email consisted only of the following 100 images arranged in this order. The text of the last image can be found at the end.
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
2139 ℹ INFORMATION SOURCE | |
23EB ⏫ BLACK UP-POINTING DOUBLE TRIANGLE | |
23EC ⏬ BLACK DOWN-POINTING DOUBLE TRIANGLE | |
23F0 ⏰ ALARM CLOCK | |
23F3 ⏳ HOURGLASS WITH FLOWING SAND | |
26C5 ⛅ SUN BEHIND CLOUD | |
26D4 ⛔ NO ENTRY | |
2705 ✅ WHITE HEAVY CHECK MARK | |
2753 ❓ BLACK QUESTION MARK ORNAMENT | |
2757 ❗ HEAVY EXCLAMATION MARK SYMBOL |
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
.input-append | |
= text_field_tag 'Search', nil, :placeholder => 'Search' | |
%button.btn | |
%i.icon-search |
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
import sublime, sublime_plugin | |
import os, string, re | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Attempts to choose the correct syntax when more than one could apply. """ | |
def __init__(self): | |
super(DetectFileTypeCommand, self).__init__() | |
self.path = None |