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 ( | |
"log" | |
"github.com/fujiwara/go-zabbix-get/zabbix" | |
) | |
func main() { | |
err := zabbix.RunTrapperServer( |
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 fluent_test | |
import ( | |
"reflect" | |
"testing" | |
) | |
var testNumbers = []interface{}{ | |
int(10), | |
uint(10), |
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
$ go-bindata -prefix=public public/... | |
$ go build |
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 mapbench_test | |
import "testing" | |
var N = 1000000 | |
func BenchmarkMap(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
m := map[int]int{} | |
for j := 0; j < N; j++ { |
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
#!/bin/bash | |
set -e | |
node="$1" | |
cmd="$2" | |
nodes=$(consul members -status alive | awk "/$node/{ print \$1 }") | |
args=() | |
for n in $nodes |
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/perl | |
use strict; | |
use warnings; | |
my $regex = shift; | |
my $cmd = quotemeta(shift); | |
my @nodes = `consul members -status alive`; | |
shift @nodes; # dispose header | |
@nodes = grep /$regex/, map { (split /\s+/, $_)[0] } @nodes; |
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 ( | |
"flag" | |
"fmt" | |
) | |
type strslice []string | |
func (s *strslice) String() string { |
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 ( | |
"bufio" | |
"flag" | |
"fmt" | |
"io" | |
"os" | |
"os/exec" | |
"sync" |
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
MATCH FAILED | |
input: [[% USE LinkTo -%]\n[% args = {\n href => '/link/to?foo=bar',\n hoge => 'huga',\n in => 'put',\n} -%]\n[% LinkTo.link_to('link_text', args) %]\n] | |
expect: [<a href="/link/to?foo=bar&in=put&hoge=huga">link_text</a>] | |
output: [<a href="/link/to?foo=bar&hoge=huga&in=put">link_text</a>] | |
FAILED 13: - template text 5 did not match expected | |
not ok 13 - template text 5 did not match expected |
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
--- browser.xul.orig 2009-05-08 23:29:02.000000000 +0900 | |
+++ browser.xul 2009-05-10 11:05:38.000000000 +0900 | |
@@ -1,26 +1,26 @@ | |
<?xml version="1.0"?> | |
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | |
<popup id="contentAreaContextMenu"> | |
+ <menuseparator insertafter="placesMenu" /> | |
<menuitem | |
class="menuitem-iconic" | |
- insertbefore="context-bookmarklink" |