This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = { | |
| addVendor: function(name, path, loaders) { | |
| this.resolve.alias[name] = path; | |
| if (loaders) { | |
| this.module.loaders.push({test: new RegExp(path), loaders: loaders}); | |
| } | |
| } | |
| ... | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| font-family: "Meiryo"; | |
| font-size: 12px; | |
| font-weight: normal; | |
| box-sizing: border-box; | |
| } | |
| html { | |
| height: 100%; | |
| overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'uri' | |
| require 'addressable/uri' | |
| module URI | |
| class << self | |
| def parse(*args) | |
| Addressable::URI.parse *args | |
| end | |
| def escape(*args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module MyApp | |
| class LogSubscriber < ActiveSupport::LogSubscriber | |
| INTERNAL_PARAMS = %w(controller action format _method only_path) | |
| IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"] | |
| class << self | |
| attr_accessor :logger | |
| end | |
| def registry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app = angular.module 'app', [] | |
| app.directive 'collapse', -> | |
| restrict: 'A' | |
| scope: | |
| isOpen: '=?' | |
| onToggle: '&' | |
| controller: ($scope) -> | |
| $scope.open = => | |
| $scope.$evalAsync => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'json' | |
| class Schema | |
| attr_reader :items | |
| def initialize(&block) | |
| @items = [] | |
| instance_eval &block | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mashiro@ricotta ~% curl -v -I -A "MSIE 10" 'http://t.co/vLSMNCVVZq' 2> /dev/null | grep location | |
| mashiro@ricotta ~% curl -v -I -A "MS1E 10" 'http://t.co/vLSMNCVVZq' 2> /dev/null | grep location | |
| location: http://twitter.com/aya_uchida/status/498859889976832000/photo/1 | |
| mashiro@ricotta ~% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| require 'nokogiri' | |
| require 'kconv' | |
| class URL | |
| include Donkun::Plugin | |
| set :help, <<-EOS | |
| URL の情報を表示します | |
| EOS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def nested_resources(*args, &block) | |
| scope only: [:index, :create] do | |
| resources *args, &block | |
| end | |
| end | |
| def shallow_resources(*args, &block) | |
| scope only: [:show, :update, :destroy] do | |
| resources *args, &block | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function vi-quit() { exit } | |
| zle -N q vi-quit |