This file contains 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
#include "underscore/underscore.js" | |
function ItemQuery(selectorString) { | |
var selectorList = _(selectorString.split(/\s+/)).map(function(v){ return v.split('.'); }); | |
var currentSelector = selectorList.pop(); | |
var elements; | |
if (currentSelector[1]) { | |
var targets = currentSelector[0] ? [currentSelector[0]] : ItemQuery.TARGETS; |
This file contains 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
#include <iostream> | |
#include <array> | |
#include <algorithm> | |
#include <boost/format.hpp> | |
namespace bf { | |
constexpr uint32_t mask(std::size_t bit) { | |
return bit < 32 ? (1 << bit)-1 : -1; | |
} | |
This file contains 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
#include <bandit/bandit.h> | |
#include <gmock/gmock.h> | |
namespace bandit_with_gmock { | |
class listener_adapter: public testing::EmptyTestEventListener, public bandit::listener { | |
protected: | |
bandit::listener * base; | |
bool is_failed; | |
public: |
This file contains 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
$ pactl set-sink-volume 0 50% # マスターボリュームを50%に設定 |
This file contains 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
p (1..100).zip([*[nil]*2,:Fizz]*33,[*[nil]*4,:Buzz]*20,[*[nil]*14,:FizzBuzz]*6).map{|v|v.compact[-1]} |
This file contains 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
scriptencoding utf-8 | |
function! g:CmdExpect(line) | |
echo a:line | |
endfunction | |
command! Expect | |
\ call g:CmdExpect(expand("<sfile>") .":". expand("<slnum>")) | |
Expect |
This file contains 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 'open3' | |
require 'pp' | |
require 'json' | |
require 'date' | |
require 'rubygems' | |
require 'faraday' | |
require 'ostruct' | |
require 'erb' | |
require 'time' |
This file contains 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 'faraday' | |
require 'rexml/document' | |
require 'ostruct' | |
require 'uri' | |
require 'pp' | |
def get(name) | |
conn = Faraday::Connection.new(url: 'https://services.addons.mozilla.org') | |
response = conn.get(URI.encode "/ja/firefox/api/1.5/search/#{name}") | |
doc = REXML::Document.new(response.body) |
This file contains 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
NeoBundle 'basyura/TweetVim', { | |
\ 'depends': [ | |
\ 'tyru/open-browser.vim', | |
\ 'basyura/twibill.vim', | |
\ 'mattn/webapi-vim', | |
\ 'h1mesuke/unite-outline', | |
\ 'basyura/bitly.vim', | |
\ 'Shougo/unite.vim', | |
\ 'mattn/favstar-vim' | |
\ ] |
This file contains 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
#include <iostream> | |
#include <memory> | |
#include <functional> | |
#include <type_traits> | |
#include <boost/optional.hpp> | |
struct manager { | |
int id = 0; | |
}; |
OlderNewer