Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ryosms
ryosms / hosts
Created July 8, 2014 14:44
AnsibleInventoryForVagrant
[normal]
vagrant ansible_ssh_host=192.168.33.10 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
[loopback]
vagrant ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
[ip_address]
192.168.33.10 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
[loopback_ip]
@ryosms
ryosms / homebrew.mxcl.jenkins.plist
Created June 1, 2012 05:53
homebrewでインストールしたjenkinsのポートを変更するほーほー
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.jenkins</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-Dfile.encoding=UTF-8</string>
学校の先生に見てもらうつもりだったんですが台風のお陰で休校になりまして・・・
お時間がございましたらTwitterなので感想やアドバイスなどいただけると嬉しいです。
見ていただき部分は「将来の目標」と「自己紹介文」の部分です。(他はおk頂きました)
※記入欄が横17cmの2行しかないため短文になっております。
*将来の目標の部分なのですが、今現在の目標はプログラマになることです。
 しかしこの書き方だと職についたら終わりのようなイメージを持たれそうで怖いです。
 プログラマになるためにこんなことをやっています。
(勉強会へ参加したり、プログラミングの学習をしたり、企業の方にプログラミングのノウハウを教え頂いたり)
@ryosms
ryosms / gist:3388407
Created August 18, 2012 17:02
count tweet's characters with twitter-text-java
public int countTweetCharacters(String text) {
int count = text.length();
Extractor extractor = new Extractor();
List<String> urls = extractor.extractURLs(text);
for (String url : urls) {
count -= (url.length() - 20);
if (url.startsWith("https://")) {
count += 1;
}
@ryosms
ryosms / GitLab4.1onUbuntu12.04.md
Last active December 11, 2015 17:09
さくらのVPSにUbuntu12.04を突っ込んでGitLab 4.1を入れる手順

1. Ubuntuのインストール

  • さくらの [VPSコントロールパネル][vps_home] から OS再インストールカスタムOSインストールへ

  • カスタムOSインストールOS選択Ubuntu 12.04 amd64 を選択

  • 注意事項を読んで 確認 ボタン → 実行 ボタン

  • VNCコンソールでインストーラーが起動するので [インストールガイド][install_guid] を参考にインストールを進める

@ryosms
ryosms / GitLab-CI2.0.md
Created January 29, 2013 07:54
さくらのVPSにUbuntu12.04を突っ込んでGitLab 4.1を入れたサーバーでGitLab CI 2.0を同居させる手順

0. 前提条件

  • サーバー:Ubunt 12.04(on さくらのVPS)
  • GitLab 4.1インストール済み
    • Ruby、mySQL、Nginxはインストール済み
  • 詳しくは GitLab4.1のインストール手順 見れ

1. GitLab-CI用ユーザーの作成

・好きな言語は?
・好きなメソッドは?
・好きなアニメは?
・好きなガンダムシリーズは?
・githubアカウントは?
・英語しゃべれる?
・最近気になるテクノロジーは?
・最近行った勉強会は?
・最近登壇した勉強会は?
・iPhone落とした事ある?
@ryosms
ryosms / Android.gitignore
Last active December 15, 2015 17:39
俺々.gitignore for Android
#
# .gitignore template for Android development
#
# This template is combined the following files in github/gitignore
# https://github.com/github/gitignore
#
# 1. Android.gitignore
# 2. Global/Eclipse.gitignore
# 3. Global/OSX.gitignore
# 4. Global/Windows.gitignore
@ryosms
ryosms / RakutenGsonConverter.java
Created August 13, 2013 08:38
楽天の凶悪なJsonをAndroidAnnotationのRest APIで無理やりなんとかするアレ
package jp.sumasu.rakutenapi;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.GsonHttpMessageConverter;
/**
* @author ryosms - ryo.sms at gmail.com
*/
public class RakutenGsonConverter extends GsonHttpMessageConverter {
@ryosms
ryosms / congratulations.py
Last active February 8, 2019 08:40
Create 'CONGRATULATIONS' image from [pixela](https://pixe.la) using [pixela2img](https://github.com/ryosms/pixela2img).
from pixela2img import Pixela2Img
from PIL import Image
converter = Pixela2Img()
congratul = converter.convert('ryosms', 'congratulations', date='20180210')
ations = converter.convert('ryosms', 'congratulations', date='20190216')
width = congratul.width + ations.width + 1
height = congratul.height