match all dashes, English alphanumerics, Japanese katakana, hiragana, multibytes of alphanumerics half-width and full-width
/[一-龠]+|[ぁ-ゔ]+|[ァ-ヴー]+|[a-zA-Z0-9]+|[a-zA-Z0-9]+[々〆〤]+/u
| #!/usr/bin/env ruby | |
| require 'bundler/setup' | |
| require 'pry' | |
| require 'pathname' | |
| module Intermediate | |
| XAXIS = 1826 | |
| YAXIS = 2436 | |
| end |
| #!/usr/bin/env ruby | |
| require 'optparse' | |
| require 'json' | |
| require 'base64' | |
| require 'pathname' | |
| module Screenshot | |
| class Snapshot | |
| attr_reader :name, :ts, :blob, :format |
| #!/usr/bin/env bash | |
| # first argument is a patch file | |
| if [ $# -eq 0 ]; then | |
| echo "No arguments supplied. Aborting." | |
| exit 0 | |
| fi | |
| PATCH_FILE=$1 |
| #!/usr/bin/env ruby | |
| require 'pathname' | |
| require 'ostruct' | |
| require 'bundler/setup' | |
| require 'json' | |
| require 'xcodeproj' | |
| PLATFORM = :ios |
| #!/usr/bin/env ruby | |
| require 'csv' | |
| class Entry | |
| attr_reader :id, :text | |
| def initialize(text) | |
| @id, @text = parse_text(text) | |
| end |
| #!/usr/bin/env ruby | |
| # Based on code from: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#Object-Storage | |
| require 'digest/sha1' | |
| require 'fileutils' | |
| require 'zlib' | |
| require 'optparse' | |
| require 'ostruct' | |
| def gen_header(content) |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
I hereby claim:
To claim this, I am signing this object:
| unless Rails.env.test? | |
| module Devise | |
| module Models | |
| module Confirmable | |
| module ClassMethods | |
| # Use email instead of confirmation_token, i.e. if user exist it will be confirmed | |
| def confirm_by_token(email) | |
| user_confirmable = find_first_by_auth_conditions(email: email) | |
| unless user_confirmable | |
| user_confirmable = find_or_initialize_with_error_by(:email, email) |