Skip to content

Instantly share code, notes, and snippets.

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

Takuya Mukohira mktakuya

🏠
Working from home
View GitHub Profile
@yuya-matsushima
yuya-matsushima / RTrim.vim
Last active December 10, 2015 00:39
保存時に実行する末尾スペース削除処理のうち、Markdownだけ都合がわるいのでちょっと変える
function! RTrim()
let s:cursor = getpos(".")
if &filetype == "markdown"
%s/\s\+\(\s\{2}\)$/\1/e
match Underlined /\s\{2}/
else
%s/\s\+$//e
endif
call setpos(".", s:cursor)
endfunction
@cmlawson
cmlawson / gist:4657413
Created January 28, 2013 17:31
Foursquare ID to Google Ref Get Google Reviews
require 'google_places'
require "foursquare2"
require "awesome_print"
require "google_plus"
API_KEY = "AIzaSyBTtzGadlCexbNTKtUxQWS65SRiewtpkgU"
@gpClient = GooglePlaces::Client.new(API_KEY)
GooglePlus.api_key = API_KEY

MacにRubyインストールするメモ

OS 10.9 Mavericksならruby2.0.0-p247が入ってるからやらなくていいけど、できればやったほうがよい。10.8以下は1.8.7しか入らないのでゴミ。全部 やりましょう。

完璧に開発環境整えたいのであればこっちを推奨。

XcodeとHomebrew(パッケージ管理システム)のインストール

AppStoreからXcodeをインストール。

@felinebabies
felinebabies / topicreadout.rb
Last active July 11, 2019 09:48
Raspberry pi にインストールしたAquesTalkPiに、YAHOO!トピックスを読み上げさせるスクリプト
# coding: utf-8
# YAHOO!トピックスの見出し一覧を取得し、差分を読み上げる
require 'nokogiri'
require 'open-uri'
require 'yaml'
require 'optparse'
#当スクリプトファイルの所在
$scriptdir = File.expand_path(File.dirname(__FILE__))
@maxivak
maxivak / 00.md
Last active December 10, 2023 14:50
Using RSpec without Rails

Using RSpec without Rails

@Myoga1012
Myoga1012 / Calendar.java
Last active January 30, 2023 08:46
Java(アプレット)でカレンダーを出力するソースコードです。
// 名前 : Myoga Screw-bright (旧名:Myoga S. Tomonaka)
// Twitter : https://twitter.com/Myoga1012
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.util.Calendar;
import java.util.Locale;
public class AppletCalendar extends Applet {
@messiahxu
messiahxu / user.rb
Created November 10, 2014 13:37
rails 4 user update_without_password
class User < ActiveRecord::Base
.....
# password section
has_secure_password
validates :password, length: { in: 6..30 }, if:->{password.present?}
.......
def update_without_password(params = {})
@aruneko
aruneko / latexmkInstall.sh
Last active August 29, 2015 14:23
latexmkの一発インストールシェルスクリプト(Linux用)
#!/bin/sh
# インストール先ディレクトリの生成と本体のダウンロード
mkdir -p $HOME/opt/latexmk
wget -O $HOME/opt/latexmk/latexmk http://mirrors.ctan.org/support/latexmk/latexmk.pl
# 実行権限とPATHの設定
chmod +x $HOME/opt/latexmk/latexmk
echo 'PATH="$HOME/opt/latexmk:$PATH"' >> $HOME/.bashrc
# 設定ファイルの書き込み
# 参考:http://konn-san.com/prog/why-not-latexmk.html
@voluntas
voluntas / gae_go.rst
Last active March 15, 2019 16:31
GAE/Go コトハジメ

GAE/Go コトハジメ

日時:2017-07-21
作:@voluntas
バージョン:0.6.0
URL:https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@mmyoji
mmyoji / dev-team-should-be.md
Last active June 17, 2022 01:42
Dev team should be
  • Using GitHub, GitLab or similar de facto git hosting/collaborating services
  • Many public chat messages, a few private ones
  • Preferring remote/asynchronous communication to synchronous one
  • Well-tested and -documented applications
  • No routine meetings: discuss whenever necessary
  • Higher priority for code review with respecting team mates' motivation
  • Make code/projects public as mush as possible rather than trying hard to write "tech blog"
  • CI/CD
  • linter/formatter: not discuss code styles or preferences during code review