This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.
Please make sure that your Gemfile in your rails application includes unicorn.
「巷で人気?のプログラミング言語」をひと通りインストールした プログラマのためのホスティングサービスRackhubの環境の新バージョンをリリースしました。
前回からいくつかのアーキテクチャの変更を行い、より使いやすくて安定した環境をお手軽に使えるようになりました。 大きな変更は、これまではコンテナ型仮想化を使っていましたが KVMによるフルバーチャライズド環境になりました。 KVM自体は、もうめずらしくもなんともない技術なので特筆することはとくにないと思うのですが、コンテナ型環境の抱える問題との決別をという意味では、良い変更になったのではないかと思います。
/Users/matsuo_ryo% brew install figlet | |
/Users/matsuo_ryo% figlet AAAA | |
_ _ _ _ | |
/ \ / \ / \ / \ | |
/ _ \ / _ \ / _ \ / _ \ | |
/ ___ \ / ___ \ / ___ \ / ___ \ | |
/_/ \_\/_/ \_\/_/ \_\/_/ \_\ | |
/Users/matsuo_ryo% figlet -c AAAA | |
_ _ _ _ |
class Post < ActiveRecord::Base | |
acts_as_paranoid | |
default_scope where :status => nil | |
end | |
# > Post | |
# => Post(id: integer, title: string, body: text, deleted_at: datetime, created_at: datetime, updated_at: datetime, status: string) | |
# > Post.all | |
# Post Load (0.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."status" IS NULL AND ("posts"."deleted_at" IS NULL) | |
# => [] |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
// This program is free software. It comes without any warranty, to | |
// the extent permitted by applicable law. You can redistribute it | |
// and/or modify it under the terms of the Do What The Fuck You Want | |
// To Public License, Version 2, as published by Sam Hocevar. See | |
// http://sam.zoy.org/wtfpl/COPYING for more details. | |
var sys = require('sys') | |
, opts = require('opts') | |
, ws = require('websocket-server') | |
, redis = require('redis') |
Awesome PHP の記事をフォークして翻訳したものです (2013年4月25日)。おどろくほどすごい PHP ライブラリ、リソースやちょっとした情報のリストです。
# -*- coding: utf-8 -*- | |
require 'amazon/ecs' | |
BROWSE_NODE = { | |
"apparel" => "361245011", | |
"baby" => "344845011", | |
"books" => "465610", | |
"classical" => "562034", | |
"dvd" => "562004", | |
"electronics" => "3510411", |
#!/bin/bash | |
# GTK+ and Firefox for Amazon Linux | |
# Written by Joseph Lawson 2012-06-03 | |
# http://joekiller.com | |
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
# chmod 755 ./gtk-firefox.sh | |
# sudo ./gtk-firefox.sh | |