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 torrent | |
import ( | |
"github.com/anacrolix/torrent/metainfo" | |
"testing" | |
"path/filepath" | |
"os" | |
"github.com/anacrolix/torrent/dht" | |
"io" | |
"errors" |
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/sh | |
. config/options $1 | |
cd $PKG_BUILD | |
./configure --host=$TARGET_NAME \ | |
--build=$HOST_NAME \ | |
--prefix=/usr \ | |
--bindir=/usr/bin \ |
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
===== Example | |
===== Can be used in a bundle like so: | |
bundle agend foo { | |
services: | |
"ejabberd" | |
service_policy => disable, | |
service_method => service("disable"); | |
} | |
===== Service management on debian |
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 python | |
import sqlite3, subprocess, time, random, sys, os | |
lfile='/var/run/fail2ban/fail2ban-sqlite.lock' | |
if os.path.exists(lfile): | |
sys.exit(0) | |
else: | |
open(lfile, 'w').close() |
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
SCRIPT_LOCATION=$(dirname $0) | |
#get common configuration | |
if [ -f ${SCRIPT_LOCATION}/hosts/common/conf ]; then | |
. ${SCRIPT_LOCATION}/hosts/common/conf | |
fi | |
#set per-host configuration | |
if [ -f ${SCRIPT_LOCATION}/hosts/$(hostname --fqdn)/conf ]; then | |
. ${SCRIPT_LOCATION}/hosts/$(hostname --fqdn)/conf |
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 $(GOROOT)/src/Make.inc | |
TARG=testtickers | |
GOFILES=testtickers.go | |
include $(GOROOT)/src/Make.cmd |
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
diff --git a/irc_callback.go b/irc_callback.go | |
index fead866..d68f92b 100644 | |
--- a/irc_callback.go | |
+++ b/irc_callback.go | |
@@ -31,7 +31,7 @@ func (irc *IRCConnection) ReplaceCallback(eventcode string, i int, callback func | |
} | |
func (irc *IRCConnection) RunCallbacks(event *IRCEvent) { | |
- if event.Code == "PRIVMSG" && event.Message[0] == '\x01' { | |
+ if event.Code == "PRIVMSG" && len(event.Message) > 0 && event.Message[0] == '\x01' { |
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
diff --git a/example/Makefile b/example/Makefile | |
index 05650bc..11255ff 100644 | |
--- a/example/Makefile | |
+++ b/example/Makefile | |
@@ -1,13 +1,6 @@ | |
include $(GOROOT)/src/Make.inc | |
-OBJS := $(patsubst %.go,%.$O,$(wildcard *.go)) | |
-OUT := $(patsubst %.$O,%,$(OBJS)) | |
+TARG=testirc |
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
diff --git a/irc_callback.go b/irc_callback.go | |
index 7875fc3..00eaaf1 100644 | |
--- a/irc_callback.go | |
+++ b/irc_callback.go | |
@@ -7,26 +7,12 @@ import ( | |
"strconv" | |
) | |
-func AppendCallback(slice, data []func(*IRCEvent)) []func(*IRCEvent) { | |
- l := len(slice) |
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 | |
loginfo() { | |
echo $* >&2 | |
} | |
lastcheck() { | |
lines=$(equery -q belongs $1 |wc -l) | |
if test $lines -eq 0; then | |
return 0 |
NewerOlder