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 / 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,
curl -L git.io/nodebrew | perl - setup
# export PATH=$HOME/.nodebrew/current/bin:$PATH を .bashrc か .zshrc に書く
nodebrew install-binary v0.12.7
nodebrew use v0.12.7
npm install -g browser-sync aglio drakov
aglio -i docs/api/index.apib -s -p 3030
@satococoa
satococoa / Gemfile
Created November 29, 2014 02:05
テスト、開発補助関連の gem
group :development do
gem 'spring'
gem 'foreman', require: false
gem 'guard-minitest'
gem 'view_source_map'
gem 'quiet_assets'
gem 'binding_of_caller'
gem 'better_errors'
gem 'bullet'
@satococoa
satococoa / NSData+Conversion.m
Created September 1, 2014 06:19
NSData を 16進数の文字列で表現する
// http://stackoverflow.com/a/9084784
#import <Foundation/Foundation.h>
@interface NSData (NSData_Conversion)
#pragma mark - String Conversion
- (NSString *)hexadecimalString;
@end
@satococoa
satococoa / sougo_follow.rb
Created July 18, 2014 08:49
sougo_follow.rb
# usage
# $ ruby sougo_follow.rb satococoa
# follower_ids も friend_ids も rate_limit が厳しいので注意
require 'bundler/setup'
Bundler.require
screen_name = ARGV[0]
client = Twitter::REST::Client.new do |config|
************************************************************************
IMPORTANT! Nokogiri builds and uses a packaged version of libxslt.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
module TagList
private
def TagList
'hoge'
end
end
class Hoge
include TagList
def some_method