CURLOPT_DNS_CACHE_TIMEOUT
: controls the TTL of a DNS cache entry. The default is 60s. Use -1 to keep the entry forever.CURLOPT_RESOLVE
: pre-populate the DNS cache manually.CURLOPT_DNS_SERVERS
: use alternate DNS servers (instead of system default ones). Warning: works only with c-ares (and it requires c-ares version >= 1.7.4),CURLOPT_DNS_USE_GLOBAL_CACHE
: cache DNS queries between easy handles. Warning: this is not thread-safe and documented as deprecated. Use the share interface instead (see below).
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 'date' | |
require 'benchmark' | |
puts "patchlevel: #{RUBY_PATCHLEVEL}, release_date: #{RUBY_RELEASE_DATE}, ruby_version: #{RUBY_VERSION}, ruby_platform: #{RUBY_PLATFORM}" | |
puts '*'*80 | |
Benchmark.bm(10) do |bm| | |
bm.report("Date.today") do | |
500_000.times { Date.today } |
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
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
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
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() int { | |
x, y := 0, 1 | |
return func() int { | |
x, y = y, x + y |
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
%lex | |
%s l_comment req | |
%% | |
"/*" { this.begin('l_comment'); return 'L_COMMENT_START'; } | |
<l_comment>"*/" { this.popState(); return 'L_COMMENT_END'; } | |
<l_comment>(.|\n) { return 'L_COMMENT_CHR'; } |
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
<?php | |
interface SayInterface | |
{ | |
public function say(); | |
} | |
class Ore implements SayInterface | |
{ | |
public function say() | |
{ |
WebRTC スタックについて
作: | @voluntas |
---|---|
バージョン: | 0.0.3 |
url: | https://voluntas.github.io/ |
Markdownドキュメントの目次を自動的に作るツールです。
main.js
のJavaScriptをコピーして、ここにペストしてください。Bookmarklet name
にMD Contents
を入力してください。Compress
ボッタンを押してください。- 画面下の辺の
MD Contents
の__リンク__を __ドロップ__して、ブラウザのBookmark Tools Bar
に移動してください。 - 使いたい際に、ブラウザでMarkdownのページを開いて、
Bookmark Tools Bar
のMD Contents
をクリックしてください。- ポップアップの内容は目次です。すべてを選んで、Wikiにコピペしてください。
シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ
- C製
- Doxygen, Moinmoinなどと連携可能
- ブロック図、クラス図、ネットワーク図など
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
#! /usr/bin/env python3 | |
""" | |
This utility will execute the given command (by default, your shell) | |
in a subshell, with an ssh-agent process running and your | |
private key added to it. When the subshell exits, the ssh-agent | |
process is killed. | |
""" | |
# This code was written by Atul Varma in February 2017. It requires |
OlderNewer