Skip to content

Instantly share code, notes, and snippets.

View kyanny's full-sized avatar

Kensuke Nagae kyanny

View GitHub Profile
@mala
mala / safari-like-cookie-policy-is-too-bad.md
Last active July 11, 2019 05:36
Firefox 22のCookieに関するポリシー変更(予定)についての意見書
@afn
afn / gist:c04ccfe71d648763b306
Created June 12, 2014 15:35
Restart phantomjs when it hangs
# Borrowed from https://github.com/y310/rspec-retry/blob/master/lib/rspec/retry.rb
CAPYBARA_TIMEOUT_RETRIES = 3
RSpec.configure do |config|
config.around(:each, type: :feature) do |ex|
example = RSpec.current_example
CAPYBARA_TIMEOUT_RETRIES.times do |i|
example.instance_variable_set('@exception', nil)
self.instance_variable_set('@__memoized', nil) # clear let variables
@flavio
flavio / gemfile_lock2geminabox.rb
Created February 2, 2012 09:21
Parse Gemfile.lock, download all gems from rubygems and then upload them to a local instance of geminabox
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler'
require 'fileutils'
require 'net/http'
require 'net/https'
require 'uri'
TMP_DIR = "/tmp/gems"

事例紹介といっちゃ事例紹介なんですが、実用性の高い情報と、再現性担保のための必要条件を推測したものなども載せているので、けっこう利便性なのではないかなと思ってます。

大前提として、これまでリモートワークなしで基本的に会社にみんな集まってわいわいがやがやしながらサービス開発運用しているスタイルのソフトウェア会社の場合、リモートワークを導入することのデメリットは従来どおり出社して働く人に強めに効いてきます。これまでちょっと込み入った内容の相談でも雑に隣の席まで椅子をスーッして話しかければ解決してたのを、slackでごちゃごちゃ書くかgoogle hangouts通話を設定するなど、精神的に一段階ステップ数が多くて面倒な何かになります。もともとslackでのみ会話してた人にとってはあまり問題ないですが、全員がそうではないですので。

@simenbrekken
simenbrekken / add.js
Created November 24, 2011 14:21
Backbone.js form submission
define([
'backbone',
'underscore',
'project/views/form'
], function(Backbone, _, ProjectFormView) {
var View = Backbone.View.extend({
events: {
'submit form': 'submit'
},
@onk
onk / .rubocop.yml
Last active January 15, 2018 02:30
僕の使っている .rubocop.yml
# rubocop v0.35.0 から inherit_gem という機能が増えたので gem にしました
# https://github.com/onk/onkcop
inherit_gem:
onkcop: "config/rubocop.yml"
(function() {
function Dispatcher() {
this.routes = [];
}
Dispatcher.prototype.route = function route(path, action) {
this.routes.push({ path: path, action: action });
return this;
};
@eadz
eadz / gist:10220496
Created April 9, 2014 02:27
slack custom css
/*
User Stylesheet for Slack.
Use with http://www.squarefree.com/userstyles/make-bookmarklet.html
to make a custom css Bookmarket
*/
.light_theme .message {
@liammclennan
liammclennan / blog_backbone_style.md
Created June 7, 2012 06:33
Backbone.js Style / Patterns

Naming Rules

Use PascalCase for constructors, namespaces and modules:

var m = new Backbone.Model(); 

Prefix private properties with _

This is a convention to compensate for JavaScript's lack of private properties on objects. Being able to identify private methods is important because it tells us that we don't need to test those methods and that they will not be coupled to anything outside of the object.

@drmohundro
drmohundro / private.xml
Last active September 21, 2017 00:36
Karabiner private.xml to swap option and command keys for Parallels
<?xml version="1.0"?>
<root>
<appdef>
<appname>PARALLELS</appname>
<equal>com.parallels.desktop.console</equal>
</appdef>
<devicevendordef>
<vendorname>MICROSOFT</vendorname>
<vendorid>0x045e</vendorid>