Skip to content

Instantly share code, notes, and snippets.

View ppworks's full-sized avatar
🏠
Working from home

Naoto Koshikawa ppworks

🏠
Working from home
View GitHub Profile
@emsk
emsk / notes.rake
Created March 25, 2013 06:33
rake notes 探索対象ディレクトリに spec ディレクトリを追加
class SourceAnnotationExtractor
def find_with_custom_directories
find_without_custom_directories(%w(app config lib script test spec))
end
alias_method_chain(:find, :custom_directories)
end
@afeld
afeld / gist:5704079
Last active June 6, 2025 21:03
Using Rails+Bower on Heroku
@frans-k
frans-k / wercker.yml
Last active October 31, 2018 20:16
My wercker.yml for Rails 4, Ruby 2, Postgresql, Rspec, Heroku deploy and automatic Heroku migrations. Had some issues with it, so hopefully it's helpful to someone.
box: wercker/ubuntu12.04-ruby2.0.0
services:
- wercker/postgresql
build:
steps:
- bundle-install
- rails-database-yml:
service: postgresql
@corocorococoro
corocorococoro / NSString+Zenkakukana.h
Last active December 20, 2015 11:09
半角カナを全角カナにする。 NSString* strHankaku = @"アイウエオ"; NSString* strZenkaku = str.convertToZenkakukana; // strZenkaku → アイウエオ
@interface NSString(NSStringAddition)
- (NSString *)convertToZenkakukana;
@end
@implementation NSString(NSStringAddition)
- (NSString *)convertToZenkakukana
{
NSMutableString *target =self.mutableCopy;
@clyfe
clyfe / simple_form.rb
Created August 22, 2013 08:20
Bootstrap3 compatible simple_form initializer
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class
# https://github.com/plataformatec/simple_form/issues/316
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
@machida
machida / urls
Created September 20, 2013 14:53
PmDの発表で出てくるURLの一覧です
スライドにてくるURL
machida
https://twitter.com/machida
合同会社フィヨルド
http://fjord.jp/
怖話
http://kowabana.jp
@tcnksm
tcnksm / docker_cheat.md
Last active January 14, 2025 15:09 — forked from wsargent/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."

@Integralist
Integralist / GitHub curl.sh
Last active February 6, 2025 20:47 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@yosshy
yosshy / Dockerfile
Last active August 19, 2019 16:26
Dockerfile for Ubuntu 14.04 with upstart
FROM ubuntu:14.04
MAINTAINER Akira Yoshiyama <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /etc/apt /var/run
ADD sources.list /etc/apt/sources.list
RUN rm /etc/apt/sources.list.d/*
RUN apt-get update
RUN apt-get install --reinstall -y openssh-server python-apt upstart sysvinit-utils
RUN mv /sbin/initctl.distrib /sbin/initctl
require 'faraday'
require 'json'
require 'yaml'
require 'pry'
require 'pp'
Setting = YAML.load_file './main.yml'
Setting['ChatWork']['OrderTemplate'] = Setting['ChatWork']['OrderTemplate'] + Setting['ChatWork']['PairOrderTemplate'].combination(2).collect {|arr| arr.join(",") }