Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

alert('test');
@app2641
app2641 / pre-commit
Created February 21, 2017 01:33
.git/hooks/pre-commit
#! /bin/sh
git df --cached --name-only --diff-filter=AM | grep '\.rb$' | grep -v 'db/schema.rb' | xargs bundle exec rubocop -c .rubocop.yml
RUBOCOP=$?
git df --cached --name-only --diff-filter=AM | grep '\.js$' | xargs npm run lint
ESLINT=$?
if [ $RUBOCOP -eq $ESLINT ]; then
exit 0
else
# prompt
export ZSH_THEME_GIT_PROMPT_DIRTY="%{%}% ✗"
export ZSH_THEME_GIT_PROMPT_CLEAN=""
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'
}
DEFAULT=$'\U1F430 '
ERROR=$'\U1F363 '
export PS1="%{%}

名前

@app2641
小林 傑 (kobayashi suguru)

職業

ウェブプログラマ

なんでRuby?

Rubyの会社に転職して使うことになったので勉強するために。

@app2641
app2641 / gist:4396017c3df8c5943610
Created May 16, 2015 08:40
Post GitHub trends to Chatwork
/**
* @var int
*/
var MAX_REPOS = 4;
/**
* @return void
*/
function postToChatworkGitHubTrends () {
@app2641
app2641 / PullRequestTemplate.md
Created January 5, 2015 08:29
PullRequestTemplate.md

関連URL

  • WikiのURL(Markdown形式)や ...
  • 画像URL や ...
  • 操作可能な画面のURLや ...
  • (あれば...) ...

概要

@app2641
app2641 / MyReadMeTemplate.md
Last active August 29, 2015 14:06
MyReadMeTemplate.md

ToolName Build Status Coverage Status

Overview

Description

Demo

Requirement

@app2641
app2641 / Registry.php
Last active August 29, 2015 13:56
Zend_Regisry もどきのクラス
<?php
class Registry extends \ArrayObject
{
/**
* @var Registry
**/
private static $instance;
@app2641
app2641 / gist:7939572
Last active December 31, 2015 05:19
ChatWorkAPI GoogleAppsScript Sample
function getCalendarSchedule () {
var calendar = CalendarApp.getCalendarsByName('予定')[0],
events = calendar.getEventsForDay(new Date()),
schedule = '';
for (var i = 0; i < events.length; i++) {
schedule += events[i].getTitle() + '\n';
}
return schedule;