Dependencies: ruby
gem install sinatra
namespace :load do | |
task :defaults do | |
set :unicorn_bin, :unicorn_rails | |
set :unicorn_pid, -> { shared_path.join('tmp', 'pids', 'unicorn.pid') } | |
set :unicorn_config, -> { current_path.join('config', 'unicorn.rb') } | |
set :unicorn_gemfile, -> { current_path.join('Gemfile') } | |
set :unicorn_env, -> { fetch(:rails_env) || fetch(:stage) } | |
set :unicorn_roles, :app | |
set :unicorn_sleep, 2 | |
end |
作者 AmosYang (Zzz...) 看板 Soft_Job 標題 Re: [請益] 大四 擔心未來找工作 時間 Mon Apr 7 01:43:31 2014 ───────────────────────────────────────
※ 引述《j999444 (渣94)》之銘言: : 1.像我現在這樣出去找工作能以實習公司的作品去面試嗎? : (因為都是自己在handle case的)
最近正好看到一些 interview 的文章,裡面有一點我覺得很有用
variable repositories { | |
default = { | |
"0" = "fakedata" | |
"1" = "deloominator" | |
} | |
} | |
resource "github_issue_label" "gardening-label" { | |
count = "${length(var.repositories)}" | |
repository = "${lookup(var.repositories, count.index)}" |
Oniguruma Regular Expressions Version 5.9.1 2007/09/05 | |
syntax: ONIG_SYNTAX_RUBY (default) | |
1. Syntax elements | |
\ escape (enable or disable meta character meaning) | |
| alternation | |
(...) group |
if [ -f "$rvm_path/scripts/rvm" ]; then | |
source "$rvm_path/scripts/rvm" | |
if [ -f ".rvmrc" ]; then | |
source ".rvmrc" | |
fi | |
if [ -f ".ruby-version" ]; then | |
rvm use `cat .ruby-version` | |
fi |
require "rubygems" | |
require "bundler" | |
require_relative "lib/importer" | |
Bundler.setup | |
desc "Import from Trello board" | |
task :import do | |
Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"] | |
end |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
There are a few additional steps I noticed to setting up a Sinatra app to work on Dokku. (These are probably also required for deploying an app to Heroku.)
original app.rb
require 'sinatra'
get '/' do
"Your Sinatra app is not quite Dokku-fied!"
end
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.