$ rustc writer_handler.rs
stream.rs:12:18: 12:24 error: explicit lifetime bound required
stream.rs:12 where H: Handler<Writer> {
^~~~~~
error: aborting due to previous error
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
import java.util.Comparator; | |
import java.util.Spliterator; | |
import java.util.Spliterators; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.function.Consumer; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
import java.util.stream.StreamSupport; |
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
@vz_move = BindResolver.new @default_bind_resolver, false | |
current_bind_resolver = @bind_resolver | |
bind_prefix_key [KEY_LEFTCTRL, KEY_Q], @vz_move do | |
bind_key [KEY_LEFTCTRL,KEY_D], KEY_END | |
end | |
if @bind_resolver != current_bind_resolver | |
raise "unexpected state" | |
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
body { | |
font-family: serif; | |
color: #333; | |
font-size: 90%; | |
} | |
a { | |
color: #33f; | |
text-decoration: none; | |
} | |
a:hover { |
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
http://youpouch.com/2015/12/11/322916/ |
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
ᕙ('ω')ᕗ |
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 "open3" | |
require "stringio" | |
require "logger" | |
module Open3 | |
def self.async_popen3( | |
cmd, | |
input: "", | |
env: {}, | |
stdout_handler: proc {|data| STDOUT.write data }, |
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
import edu.umd.cs.findbugs.SortedBugCollection | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.google.code.findbugs:findbugs:3.0.1' | |
} | |
} |
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
# Active application logger with python and pyobjc | |
# require `pyobjc`: | |
# $ pip install pyobjc | |
from AppKit import * | |
from PyObjCTools import AppHelper | |
def main(): | |
nc = NSWorkspace.sharedWorkspace().notificationCenter() |
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
// 外部プロセス呼び出しサンプル | |
// 外部プロセスの標準出力・エラー出力はこのプロセスのものを使う | |
extern crate libc; | |
use std::io::{Command, IoResult}; | |
use std::io::process::ProcessExit; | |
use std::io::process::ProcessExit::{ExitStatus, ExitSignal}; | |
use std::io::process::StdioContainer::InheritFd; | |
// POSIX 以外だとどうなる? |