- Setup a new Rails app
- Initialize a local repository using git
- Create a new remote repository using GitHub
- Change README.rdoc
- Deploy to a cloud service - Heroku
- Ruby is installed (v 1.9.3)
- Rails is installed (v 3.2.3)
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |
# encoding: utf-8 | |
# Be sure to restart your server when you modify this file. | |
# Add new inflection rules using the following format | |
# (all these examples are active by default): | |
# ActiveSupport::Inflector.inflections do |inflect| | |
# inflect.plural /^(ox)$/i, '\1en' | |
# inflect.singular /^(ox)en/i, '\1' | |
# inflect.irregular 'person', 'people' | |
# inflect.uncountable %w( fish sheep ) |
<ul id="list"> | |
<li>Item 1</li> | |
<li>Item 2</li> | |
<li>Item 3</li> | |
<li>Item 4</li> | |
<li>Item 5</li> | |
<li>Item 6</li> | |
</ul> | |
<script> |
/* | |
You don't need a file, just use your internet-audiostream url to open. like this: | |
*/ | |
AVFormatContext *ic = avformat_alloc_context(); | |
err = avformat_open_input(&ic, "rtmp://www.something.com/a.mp4", NULL, NULL); |
//Fade an element out and then remove it | |
var s = document.getElementById('thing').style; | |
s.opacity = 1; | |
(function fade(){(s.opacity-=.1)<0?s.display="none":setTimeout(fade,40)})(); | |
//Make an AJAX call | |
var r = new XMLHttpRequest(); | |
r.open("POST", "path/to/api", true); | |
r.onreadystatechange = function () { | |
if (r.readyState != 4 || r.status != 200) return; |
Streams are one of the most used concepts in nodejs, but also one that most people find hard to fully grasp. So with this note I aim to shed some light on their purpose and how you can you can use them in your projects. Here I'm not going to go into too much detail on the various types of streams, but rather a simple overview what they are and the way to use them.
The official definition of a stream in nodejs is as follows:
A stream is an abstract interface implemented by various objects in Node.js. Streams are readable, writable, or both. All streams are instances
To enable the precompilation of all non.js/.css assets within vendor/assets
just add this to config/initializers/assets.rb
:
Rails.application.config.assets.precompile << Proc.new { |path, fn| fn =~ /vendor\/assets/ && !%w(.js .css).include?(File.extname(path)) }
Be aware that this will precompile ALL non .js/.css assets that you have there, some plugins or libraries might have .txt or other files around, and those would end up into your precompiled list also.
If you need to precompile images only, you could use this:
Rails.application.config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <netinet/tcp.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> |