Skip to content

Instantly share code, notes, and snippets.

@the-dvlpr
the-dvlpr / host_your_rails_app_on_ec2.md
Last active May 21, 2019 13:01
Deploy and reroute traffic from your purchased domain name to your Rails app on a self-hosted EC2 server utilizing GitHub

Punchlist for Serving your Rails App on an EC2 Instance

Run through this list to setup your EC2 instance and host your rails app. This list makes a few assumptions (make changes as necessary)

  • You have github repo with a rails app pushed to it that we'll just pull down to the new server
  • You're using Rails 5.1

If not, see very bottom for steps to build a quick example app.

Launching EC2 instance

  • Use the basic Linux AMI distro: Amazon Linux AMI 2017.09.0 (HVM), SSD Volume Type - ami-8c1be5f6
  • Select a size: t2.micro is fine for this, unless you need larger for a production app
@hmans
hmans / application.html.slim
Created November 8, 2016 21:54
Rails 5.0 Application Layout, Slim-style
doctype html
html
head
title My App
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
= csrf_meta_tags
body
@delemach
delemach / slackNotify.js
Last active November 1, 2018 18:41 — forked from turret-io/slackNotify.js
Parse SNS notification from Elastic Beanstalk and publish to Slack channel
var http = require('https');
var querystring = require('querystring');
// set the post request options
var reqOptions = {
hostname: 'hooks.slack.com',
port: 443,
path: '/services/YOUR/SLACK/HOOK_HERE',
method: 'POST'
};

JavaScript, the weird parts

link to notes https://git.io/vgpKc

about Sher Minn

  • front-end web engineer
  • funemployed, but joining Viki.com in a week
  • recently spent 3 months in NYC at the Recurse Center
    • retreat for programmers
  • where people go to be better at what they do
command prompt:
cmd+p
package command prompt:
cmd+shift+p
select lines:
shift+ up/down
moving lines:
@webinista
webinista / RunAProxyOnAmazonEC2VPC.md
Last active April 27, 2024 12:21
Create a proxy server on an Amazon EC2 (VPC) instance

This will create a proxy server in whatever your availability zone your VPC is in. For me, that's us-east-1b. For you, that may be something different. Steps 10+ should more or less work regardless of your provider since those steps cover the setup and configuration of TinyProxy.

  1. Click the Launch Instance button.
  2. Choose Ubuntu Server 14.04 LTS (HVM), SSD Volume Type. This isn't strictly necessary. If you choose another OS, check its documentation for how to install new packages.
  3. On the Choose an Instance Type screen, select t2.micro. It's Free Tier eligible.
  4. Click the Next: ... buttons until you reach the Configure Security Group screen.
    • You may wish to reduce the amount of storage on the Add Storage screen. This is optional.
    • You may wish to add a tag on the Tag Instance screen. This is also optional.
  5. On the Configure Security Group screen:
  • Select Create a new security group.
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@iHassan
iHassan / Galaxy Of Tutorial Torrents
Created February 11, 2015 01:20
Ultimate Galaxy Of Tutorial Torrents
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@titaniumtails
titaniumtails / Ruby Gems I love.md
Last active August 29, 2015 14:08
Really Useful Ruby Gems.md

##Essential Gems I love

##Index GENERAL

gem 'autoprefixer-rails'
gem 'bootswatch-rails'
gem 'bourbon'
gem 'country_select'
gem 'carrierwave'
@harryworld
harryworld / nested_resources.md
Last active August 29, 2015 14:08
Nested Resources

Nested Resources

class Post < ActiveRecord::Base
  has_many :comments
end
 
class Comment < ActiveRecord::Base
  belongs_to :post
end