Skip to content

Instantly share code, notes, and snippets.

View satococoa's full-sized avatar

Satoshi Ebisawa satococoa

View GitHub Profile
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
gem 'jwt'
@satococoa
satococoa / multi-user-homebrew.md
Created April 16, 2012 03:08
マルチユーザーでHomebrewを使う

マルチユーザーでHomebrewを使う

staffグループのユーザーに/usr/local以下の書き込み権限を与えればいい

umask 0022 を umask 0002 に変更し、新しく作成したファイルにgroup writeパーミッションがつくようにする

/etc/bashrc OR /etc/profileの最終行に以下を追加

umask 0002
@satococoa
satococoa / server.go
Created May 7, 2019 10:30
echoserver
package server
import (
"fmt"
"log"
"net"
"strings"
"sync"
"time"
)
@satococoa
satococoa / apimode.diff
Last active December 14, 2017 02:22
Rails API mode の差分
diff -urN apimode/.gitignore normal/.gitignore
--- apimode/.gitignore 2017-12-13 18:38:46.000000000 +0900
+++ normal/.gitignore 2017-12-13 18:38:57.000000000 +0900
@@ -17,4 +17,7 @@
!/log/.keep
!/tmp/.keep
+/node_modules
+/yarn-error.log
+
@satococoa
satococoa / omnisharp.json
Created October 19, 2017 09:30
VSCode C# formatterOptions
{
"formattingOptions": {
"NewLinesForBracesInTypes": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInAccessors": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
@satococoa
satococoa / main_spec.rb
Last active March 12, 2017 23:46
spec が強制終了してる?
class User
attr_accessor :name
def initialize(name = '')
@name = name
end
def initWithCoder(decoder)
self.init
self.name = decoder.decodeObjectForKey('name')
@satococoa
satococoa / setup.sh
Last active June 5, 2016 03:02
Mac OS X 上での Homebrew + rbenv + ruby-build + ruby + rails の環境構築(Xcode, Comamnd Line Tools のインストールを済ませてから。)
# Homebrew のインストール
# 公式 (http://brew.sh/) に載っているコマンドです
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Ruby のビルドに必要なものをインストール
brew install openssl readline rbenv ruby-build # 時間がかかります
# rbenv 用の設定を .bash_profile に書き込む
echo 'export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl) --with-readline-dir=$(brew --prefix readline) $RUBY_CONFIGURE_OPTS"' >> ~/.bash_profile
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
@satococoa
satococoa / ApplySyntax.sublime-settings
Last active January 18, 2016 21:21
Sublime Text 3 RubyMotionBuilder and ApplySyntax settings
// Packages/User/ApplySyntax.sublime-settings
{
// If you want exceptions reraised so you can see them in the console, change this to true.
"reraise_exceptions": false,
// If you want to have a syntax applied when new files are created, set new_file_syntax to the name of the syntax to use.
// The format is exactly the same as "name" in the rules below. For example, if you want to have a new file use
// JavaScript syntax, set new_file_syntax to 'JavaScript'.
"new_file_syntax": false,
base_dir = "/var/www/hoge_server"
worker_processes 20
working_directory "#{base_dir}/current"
shared = "#{base_dir}/shared"
listen "#{shared}/tmp/sockets/unicorn.sock"
timeout 30
pid "#{shared}/tmp/pids/unicorn.pid"
stderr_path "#{shared}/log/unicorn.stderr.log"
stdout_path "#{shared}/log/unicorn.stdout.log"
@satococoa
satococoa / copy_sdk.sh
Created November 26, 2013 05:06
Mavericks で iOS 6 SDK でビルドしたかった http://hipbyte.myjetbrains.com/youtrack/issue/RM-188
#!/bin/sh
# copy sdk
XCODE4=/Applications/Xcode4.app/Contents/Developer
XCODE5=/Applications/Xcode.app/Contents/Developer
SIM_DIR=Platforms/iPhoneSimulator.platform/Developer/SDKs
IOS_DIR=Platforms/iPhoneOS.platform/Developer/SDKs
rsync -av ${XCODE4}/${SIM_DIR}/iPhoneSimulator6.1.sdk ${XCODE5}/${SIM_DIR}