Skip to content

Instantly share code, notes, and snippets.

@ideomix
ideomix / README.md
Created June 19, 2012 15:47 — forked from keikubo/README.md
Nginx + Unicorn for Rails on Rackhub

Nginx + Unicorn for Rails on Rackhub

Description:

This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.

Installation:

Please make sure that your Gemfile in your rails application includes unicorn.

@ideomix
ideomix / README.md
Created June 21, 2012 14:15 — forked from sowawa/README.md
Rackhub 2nd generation

Gist一枚でわかる、Rackhub 2nd generation!

「巷で人気?のプログラミング言語」をひと通りインストールした プログラマのためのホスティングサービスRackhubの環境の新バージョンをリリースしました。

前回からいくつかのアーキテクチャの変更を行い、より使いやすくて安定した環境をお手軽に使えるようになりました。 大きな変更は、これまではコンテナ型仮想化を使っていましたが KVMによるフルバーチャライズド環境になりました。 KVM自体は、もうめずらしくもなんともない技術なので特筆することはとくにないと思うのですが、コンテナ型環境の抱える問題との決別をという意味では、良い変更になったのではないかと思います。

/Users/matsuo_ryo% brew install figlet
/Users/matsuo_ryo% figlet AAAA
_ _ _ _
/ \ / \ / \ / \
/ _ \ / _ \ / _ \ / _ \
/ ___ \ / ___ \ / ___ \ / ___ \
/_/ \_\/_/ \_\/_/ \_\/_/ \_\
/Users/matsuo_ryo% figlet -c AAAA
_ _ _ _
@ideomix
ideomix / README.md
Created October 12, 2012 12:09 — forked from keikubo/README.md
Nginx + Unicorn for Rails on Rackhub

Nginx + Unicorn for Rails on Rackhub

Description:

This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.

Installation:

Please make sure that your Gemfile in your rails application includes unicorn.

@ideomix
ideomix / unk.rb
Created October 13, 2012 02:34 — forked from miyucy/unk.rb
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)
# => []
@ideomix
ideomix / gist:4037393
Created November 8, 2012 07:29 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

Share Counts

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.

Twitter

@ideomix
ideomix / chat.js
Last active December 14, 2015 09:19 — forked from dakatsuka/chat.js
// 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')

すぐれた PHP ライブラリとリソース

Awesome PHP の記事をフォークして翻訳したものです (2013年4月25日)。おどろくほどすごい PHP ライブラリ、リソースやちょっとした情報のリストです。

Composer

Composer 関連

# -*- coding: utf-8 -*-
require 'amazon/ecs'
BROWSE_NODE = {
"apparel" => "361245011",
"baby" => "344845011",
"books" => "465610",
"classical" => "562034",
"dvd" => "562004",
"electronics" => "3510411",
@ideomix
ideomix / gtk-firefox.sh
Last active April 6, 2018 08:04 — forked from joekiller/gtk-firefox.sh
INSTALL FIREFOX ON AMAZON LINUX X86_64 COMPILING GTK+
#!/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