Skip to content

Instantly share code, notes, and snippets.

View nacyot's full-sized avatar
🧶
The Science of Hitting

Daegwon Nacyot Kim nacyot

🧶
The Science of Hitting
View GitHub Profile
@nacyot
nacyot / saenaru.js
Created August 13, 2016 05:53 — forked from wkpark/saenaru.js
자바스크립트 새나루 한글 입력기
/**
* Saenaru Javascript Hangul Input Method by wkpark at gmail.com
* 2013/03/25
* License: GPLv2
*/
var Saenaru = function() {};
Saenaru.prototype = {
_q: [],
// Addons
jsbin.settings.addons.closebrackets = false;
jsbin.settings.addons.emacs = false;
jsbin.settings.addons.fold = true;
jsbin.settings.addons.highlight = true;
jsbin.settings.addons.trailingspace = true;
jsbin.settings.addons.vim = true;
// Editor
jsbin.settings.editor.autoClearEmptyLines = true;

Description

Dashing widget to show the build status of a CircleCI project.

Usage

  • Get a Circle API Token from your Account Dashboard and set it in your environment as CIRCLE_CI_AUTH_TOKEN
  • Add the httparty to your Gemfile and run bundle install

Then:

Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた

[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
namespace :rails_best_practices do
desc "run rails best practices"
task :jenkins_plot_plugin => :environment do
OUTDIR = "./reports"
mkdir OUTDIR unless FileTest.exist? OUTDIR
OUTFILE = "#{OUTDIR}/rails_best_practices.properties"
Tempfile.open('rails_best_practices.XXXXXX', OUTDIR) do |file|
TMPFILE = file.path