MessagePackが文字列とバイナリをわけないのは問題?
Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案
(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう
| #!/bin/zsh | |
| # https://gist.github.com/dreness/e61fb16dcb831adaf6ff | |
| # [email protected] | |
| # | |
| # This script attempts to repair Quicktime Player audio recordings | |
| # that become broken when Quicktime Player is interrupted while recording. | |
| # AIFC files can be recovered with no additional help, however to recover | |
| # M4A files, you also need the 'faad' command line tool. |
| // Playground - noun: a place where people can play | |
| import Cocoa | |
| struct Regex { | |
| let pattern: String | |
| let expressionOptions: NSRegularExpressionOptions | |
| let matchingOptions: NSMatchingOptions | |
| init(pattern: String, expressionOptions: NSRegularExpressionOptions, matchingOptions: NSMatchingOptions) { |
| 802 名前:おさかなくわえた@kzk_moverさん 投稿日:2013/03/07(金) 16:42:24 ID:s2RHsW2o | |
| 上に割引券についての話がありましたけど | |
| 私は@repeatedly先生の割引チケットの券を捨ててしまって後悔した立場でした | |
| ガールズバーのでしたけど | |
| かなり近所のガールズバーの券がまさに大量(数種類も集めてて机一つめいっぱい使って)という感じでした | |
| 入社2年目ぐらいから「こんなにあるんだからもうもらってこないでよ」と@repeatedlyに言い続けたのですが | |
| 毎回全然行動してくれずに言葉を濁す@repeatedlyにキレてしまい | |
| 留守中に業者を呼んで引き取ってもらえるものは引き取ってもらいました |
| # config/initializers/source_maps.rb | |
| if Rails.env.development? | |
| module CoffeeScript | |
| class SourceMapError < StandardError; end; | |
| class << self | |
| def compile script, options | |
| script = script.read if script.respond_to?(:read) |
MessagePackが文字列とバイナリをわけないのは問題?
Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案
(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう
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:
| module UniqueConstraint | |
| def self.included(model) | |
| model.extend(ClassMethods) | |
| end | |
| module ClassMethods | |
| def unique_constraint_violation_message | |
| "#{name} must be unique" | |
| end |
| #!/bin/bash | |
| apikey=$(git config user.asana-key) | |
| if [ $apikey == '' ] ; then exit 0; fi | |
| comment=$(git log --pretty=oneline -n1) | |
| taskid_pattern='.*#([0-9]*).*' | |
| if [[ $comment =~ $taskid_pattern ]]; then | |
| taskid=${BASH_REMATCH[1]} | |
| apikey=$(git config user.asanakey) |
| require 'base64' | |
| require 'openssl' | |
| # This is inspired by [rack-facebook-signed-request](https://github.com/gamesthatgive/rack-facebook-signed-request) | |
| # | |
| # Usage | |
| # | |
| # use Rack::FBSignedRequest, :secret => 'SECRET' | |
| # | |
| class Rack::FBSignedRequest |
| ->> perlbrew exec perl -e 'package Foo; s//"warn __PACKAGE__"/ee' | |
| perl-5.10.1 | |
| ========== | |
| Foo at (eval 1) line 1. | |
| perl-5.12.1 | |
| ========== | |
| Foo at (eval 1) line 1. |