Skip to content

Instantly share code, notes, and snippets.

@fightingtheboss
fightingtheboss / box-model.html
Last active August 29, 2015 14:09
CSS Box Model Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Working with the Box Model</title>
<style>
.box {
width: 500px;
height: 300px;
@fightingtheboss
fightingtheboss / index.html
Last active August 29, 2015 14:09
HTML Fundamentals, Part 2: Semantics In Detail
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Fundamentals</title>
<link rel="stylesheet" href="styles.css">
</head>
<body class="container">
<header>
<h1>HTML Fundamentals</h1>
@fightingtheboss
fightingtheboss / rwd_part1_solution.html
Created June 3, 2014 21:55
Barebones solution to the Responsive Web Design, Part 1 assignment
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Media Queries</title>
<meta name="viewport" content="initial-scale=1,width=device-width">
<style>
html, body {
width: 100%;
@fightingtheboss
fightingtheboss / index.html
Last active August 29, 2015 14:02
A starter HTML document for creating your first responsive design
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>McFly Hoverboards</title>
<meta name="viewport" content="">
<style>
/* Add your styles here */
* {
@fightingtheboss
fightingtheboss / gist:4bd5cb54e027db2f4163
Created June 2, 2014 22:05
A playground for testing your skills with @media queries
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Media Queries!</title>
<meta name="viewport" content="initial-scale=1,width=device-width">
<style>
/* Add your styles here */
@fightingtheboss
fightingtheboss / deploy.rb
Last active August 30, 2016 07:58
Capistrano deploy script for deploying multiple app instances of a Meteor app to a single private VPS on different ports.
# This deploy script takes a parameter to define the number of instances to deploy (default is 1)
# ex: cap deploy -s instances=3
set :application, "YOUR_APP_NAME"
set :repository, "git@YOUR_GIT_REPOT.git"
set :scm, :git
set :deploy_via, :remote_cache
set :user, "deploy"
set :deploy_to, "/home/deploy/www/#{application}"
@fightingtheboss
fightingtheboss / haproxy.cfg
Created June 23, 2013 01:17
HAProxy configuration file for deploying Meteor application to private VPN. Fronted by nginx for static assets, backed by multiple app instances. See https://gist.github.com/fightingtheboss/5843323 for Nginx setup.
global
daemon
defaults
mode http
timeout connect 86400000
timeout server 86400000
timeout client 86400000
timeout check 5s
@fightingtheboss
fightingtheboss / nginx.conf
Created June 23, 2013 01:13
Nginx configuration file for private VPN deployment of a Meteor app with HAProxy handling load balancing
upstream haproxy {
server 127.0.0.1:9000;
}
upstream stats {
server 127.0.0.1:9999;
}
server {
listen 80; ## listen for ipv4; this line is default and implied
@fightingtheboss
fightingtheboss / deploy.rb
Created June 22, 2013 22:46
A Capistrano deploy script for deploying a Meteor app to multiple EC2 Ubuntu instances in parallel. Requires AWS EC2 Tools to be properly installed locally to work.
# The goal will be to ultimately make a Capistrano deploy script that does
# what meteor.sh is doing, but in parallel.
# This assumes you're using an AMI with Node, NPM, Meteor, Forever and
# optionally Meteorite installed
set :application, "YOUR_APP_NAME"
set :repository, "git@YOUR_GIT_REPO.git"
set :scm, :git
@fightingtheboss
fightingtheboss / configuration.yml
Last active September 15, 2023 07:29
An Amazon Elastic Beanstalk configuration file for a Meteor project. This file needs to be saved in the .ebconfiguration/ directory at the root of your project. Deployed with `git aws.push`. Replace MONGO_URL with the URL to your MongoDB instance (I use MongoHQ).
packages:
yum:
git: []
files:
/opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh:
mode: "000755"
user: root
group: root
encoding: plain