Skip to content

Instantly share code, notes, and snippets.

View nomnel's full-sized avatar

nomnel nomnel

View GitHub Profile
# Description:
# Hubot GitHub Notification for each channel
#
# Commands:
# hubot github_notification on <branch> - コミットを通知するブランチを追加
# hubot github_notification off <branch> - 指定のブランチのコミットを通知しないように
# hubot github_notification ls - 現在のchannelで設定されているブランチの一覧
#
# Author:
# @nomnel
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
require 'sass'
require 'sass/exec'
target_files = ARGV.select {|x| x[-5..-1] == '.sass'}
@nomnel
nomnel / cookie.js
Last active December 23, 2015 16:09
くっきー
if you.最初の週?
you.すること = 学習
elsif interns.学習週?
you.すること = 学習
else
you.すること = 作業
end
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
@nomnel
nomnel / a.rb
Last active December 18, 2015 02:29
Ranking.constants
=> [:GeneratedFeatureMethods, :ClassMethods, :ConnectionSpecification, :OrmAdapter, :COLUMNS, :Statements,
:TableDefinition, :CommandRecorder, :AttachmentContentTypeValidator, :HelperMethods, :AttachmentPresenceValidator,
:AttachmentSizeValidator, :Defining, :Running, :SingletonMethods, :InstanceMethods, :TransactionError,
:MacroReflection, :AggregateReflection, :AssociationReflection, :ThroughReflection, :Serializer, :ASSOCIATION_TYPES,
:AssociationBuilderExtension, :TooManyRecords, :UNASSIGNABLE_KEYS, :InstanceMethodsOnActivation, :Middleware,
:Association, :SingularAssociation, :CollectionAssociation, :CollectionProxy, :BelongsToAssociation,
:BelongsToPolymorphicAssociation, :HasAndBelongsToManyAssociation, :HasManyAssociation, :HasManyThroughAssociation,
:HasOneAssociation, :HasOneThroughAssociation, :ThroughAssociation, :Builder, :Preloader, :JoinDependency,
:AssociationScope, :AliasTracker, :JoinHelper, :CALLBACKS, :Attribute, :ATTRIBUTE_TYPES_CACHED_BY_DEFAULT,
@nomnel
nomnel / foo.coffee
Last active December 17, 2015 17:48
$.ajax
type: 'get'
url: '画像のURL'
success: ->
そのまま表示
error: ->
デフォルト画像を表示
@nomnel
nomnel / delete_instapaper_bookmarks.js
Created May 12, 2013 06:10
InstapaperでひたすらDeleteリンククリックするやつ (しょっちゅう失敗する)
window.confirm = function () { return true; };
xs = document.getElementsByClassName("deleteLink");
for (var i = xs.length - 1; i >= 0; i--) {
xs[i].click();
}
location.reload();
# coding: utf-8
require 'spec_helper'
feature 'Create new story', js: true do
background do
visit '/users/sign_in'
within("#new_user") do
fill_in 'user[email]', with: 'komagata@gmail.com'
fill_in 'user[password]', with: 'testtest'
end
module ActionView
module Helpers
module FormTagHelper
alias_method :original_submit_tag, :submit_tag
def submit_tag(value=nil, options={})
options[:disable_with] = options[:disable_with] == '' ? nil : 'Sending...'
original_submit_tag value, options
end
end
end