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
str := "From: mail notification service <" + GlobalConfig.MailAddress + ">\nTo: Owner <" + repository.NotifyEmail + ">\nSubject: [" + repository.Name + "] error notification\n\nSomething went wrong while handling the repository '" + repository.Name + "'. Please check the output log files!\n" | |
auth := smtp.PlainAuth(GlobalConfig.MailUsername, GlobalConfig.MailUsername, GlobalConfig.MailPassword, GlobalConfig.MailHost) | |
err := smtp.SendMail(GlobalConfig.MailHost + ":25", auth, GlobalConfig.MailAddress, []string{repository.NotifyEmail}, []byte(str)) | |
if err != nil { | |
fmt.Printf("Error sending mail: %s\n", err) | |
} |
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/goweb/Makefile b/goweb/Makefile | |
index fe6c71e..69f976a 100644 | |
--- a/goweb/Makefile | |
+++ b/goweb/Makefile | |
@@ -1,5 +1,3 @@ | |
-include $(GOROOT)/src/Make.inc | |
- | |
TARG=goweb | |
GOFILES=\ | |
constants.go \ |
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/goweb/Makefile b/goweb/Makefile | |
index fe6c71e..69f976a 100644 | |
--- a/goweb/Makefile | |
+++ b/goweb/Makefile | |
@@ -1,5 +1,3 @@ | |
-include $(GOROOT)/src/Make.inc | |
- | |
TARG=goweb | |
GOFILES=\ | |
constants.go \ |
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 | |
if [ $# -eq 0 ] | |
then | |
echo "$0 [home|office]" | |
exit | |
fi | |
if [ $1 == "home" ] | |
then |
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
// Author: Luka Napotnik <[email protected]> | |
// This code is public domain. | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> |
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 ( | |
"io/ioutil" | |
"unsafe" | |
) | |
type Data struct { | |
Head [4]byte | |
Flags byte |
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 uuid | |
// #include <stdlib.h> | |
// #include <uuid/uuid.h> | |
import "C" | |
import "unsafe" | |
func Generate() []byte { | |
var uuid []byte = make([]byte, 16) |
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
/* | |
Parse() calls uuid_unparse() which takes unsigned char * as arg1 and char * as arg2 | |
-- parses the first argument and writes a string representation in the second argument (37 bytes) | |
*/ | |
func Parse(_uuid []byte) string { | |
var _str []byte = make([]byte, 37) | |
C.uuid_unparse((*C.uchar)(unsafe.Pointer(&_uuid)), (*C.char)(unsafe.Pointer(&_str))) | |
return string(_str) | |
} |
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 ( | |
"os" | |
"encoding/binary" | |
) | |
type info struct { | |
a, b, c int32 | |
d, e, f uint8 |
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 "gtk" | |
import "fmt" | |
func main() { | |
gtk.Init(nil) | |
vbox := gtk.VBox(false, 2) | |
window := gtk.Window(gtk.GTK_WINDOW_TOPLEVEL) |
NewerOlder