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
use clap::clap_app; | |
use memmap::MmapOptions; | |
use serde_json::value::RawValue; | |
use std::fs::File; | |
use std::io; | |
fn main() -> io::Result<()> { | |
let matches = clap_app!(myapp => | |
(about: "Split file containing a top level json array into many files.") |
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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "0.1.0", | |
"command": "stack", | |
"tasks": [ | |
{ | |
"taskName": "build", | |
"isBuildCommand": true | |
}, |
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
{-# LANGUAGE OverloadedStrings #-} | |
module DGPHParser(parseDgph) where | |
import qualified Data.Attoparsec.ByteString as A | |
import qualified Data.ByteString as B | |
import Data.Bits | |
import Data.Foldable (foldl') | |
import qualified Data.ByteString as B | |
import qualified Data.Attoparsec.ByteString as A |
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
" requires vim-flow: https://github.com/facebook/vim-flow/ | |
" put this in a syntax_checkers/ directory, such as: | |
" .vim/bundle/flowtype/syntax_checkers/javascript/flow.vim | |
if exists("g:loaded_syntastic_javascript_flow_checker") | |
finish | |
endif | |
let g:loaded_syntastic_javascript_flow_checker = 1 | |
let s:save_cpo = &cpo |
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
#include <llvm/Option/ArgList.h> | |
#include <llvm/Option/Arg.h> | |
#include <clang/Driver/Options.h> | |
#include <llvm/Option/OptTable.h> | |
#include <llvm/Support/raw_ostream.h> | |
#include <memory> | |
using namespace llvm; |
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
#!/bin/bash | |
cd $(dirname $0) | |
OUTDIR=_out | |
mkdir -p $OUTDIR | |
OUTNINJA=$OUTDIR/build.ninja | |
cat << EOF > $OUTNINJA | |
rule ln |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-| | |
Tokenizer for SLF0 serialization format, used by Xcode to, at the very least, | |
encode some log files. | |
For example, `.xcactivitylog` logs are gzipped files of this format, | |
serializing some objc classes which represent the build log. | |
This class tokenizes the raw byte stream into a flat list of tokens. The actual |
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
class PortAllocatorFactoryWrapper : public PortAllocatorFactory { | |
public: | |
PortAllocatorFactoryWrapper(talk_base::Thread* worker_thread, int minPort, int maxPort) | |
: PortAllocatorFactory(worker_thread), minPort_(minPort), maxPort_(maxPort) {} | |
virtual cricket::PortAllocator *CreatePortAllocator( | |
const std::vector<StunConfiguration> &stun, | |
const std::vector<TurnConfiguration> &turn) override { | |
auto allocator = PortAllocatorFactory::CreatePortAllocator(stun, turn); | |
allocator->SetPortRange(minPort_, maxPort_); |
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 pruneCommittedDiffs(mailbox, dest_mailbox) | |
diff_set = mailbox:contain_subject('[Differential]') | |
committed_diff_set = diff_set:contain_field('X-Phabricator-Mail-Tags', '<differential-committed>') | |
for _, message in ipairs(committed_diff_set) do | |
mmbox, uid = table.unpack(message) | |
rev_key = string.gsub(mmbox[uid]:fetch_field('In-Reply-To'), 'In%-Reply%-To: ', '') | |
all_diff_msgs = diff_set:contain_field('In-Reply-To', rev_key) + diff_set:contain_field('Message-ID', rev_key) | |
all_diff_msgs:move_messages(dest_mailbox) | |
end | |
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
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php | |
index ba7adb4..8c4031c 100644 | |
--- a/src/__phutil_library_map__.php | |
+++ b/src/__phutil_library_map__.php | |
@@ -157,6 +157,7 @@ phutil_register_library_map(array( | |
'ArcanistSpellingDefaultData' => 'lint/linter/spelling/ArcanistSpellingDefaultData.php', | |
'ArcanistSpellingLinter' => 'lint/linter/ArcanistSpellingLinter.php', | |
'ArcanistSpellingLinterTestCase' => 'lint/linter/__tests__/ArcanistSpellingLinterTestCase.php', | |
+ 'ArcanistStgitAPI' => 'repository/api/ArcanistStgitAPI.php', | |
'ArcanistSubversionAPI' => 'repository/api/ArcanistSubversionAPI.php', |
NewerOlder