start new:
tmux
start new with session name:
tmux new -s myname
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title> | |
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { |
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
# Minimal sample configuration file for Unicorn (not Rack) when used | |
# with daemonization (unicorn -D) started in your working directory. | |
# | |
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. | |
# See also http://unicorn.bogomips.org/examples/unicorn.conf.rb for | |
# a more verbose configuration using more features. | |
listen 2007 # by default Unicorn listens on port 8080 | |
worker_processes 1 # this should be >= nr_cpus |
class FoosController < ApplicationController | |
respond_to :atom, :api_v1 | |
before_filter :set_default_format | |
def index | |
@foos = Foo.all | |
respond_to do |format| | |
format.xml { render :xml => @foos.to_xml } | |
format.api_v1 { render :json => @foos.to_json } |
This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end
Задание
Реализовать на Ruby с использованием Rails приложение со следующим функционалом:
Требования
package net.nelanka.akka_sandbox.cluster_sharding.experiments | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
import scala.language.postfixOps | |
import scala.util.{Failure, Success} | |
import akka.actor.{Actor, ActorRef, ActorSystem, FSM, Props, Terminated} | |
import akka.cluster.Cluster | |
import akka.cluster.sharding.ShardCoordinator.LeastShardAllocationStrategy |