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 | |
/** | |
* BitBucket Webhook: | |
* Update git repository on push to given branch | |
* | |
* (c) 2015, Valera Leontyev (feedbee@gmail.com) | |
*/ | |
$branch = 'master'; |
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" | |
import "net/http" | |
import "flag" | |
import "os" | |
import "path/filepath" | |
func main() { | |
// --help |
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" | |
"net/http" | |
"strconv" | |
) | |
func main() { | |
ports := []int{8080, 8081} |
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
function encode(string) { | |
var bytes = Utilities.newBlob("").setDataFromString(string, "windows-1251").getBytes(); | |
var res = ""; | |
for (var i = 0; i < bytes.length; i++) { | |
var n = bytes[i] & 0xFF; | |
var hexString = n.toString(16); | |
if (hexString.length % 2) { | |
hexString = '0' + hexString; | |
} | |
res += "%" + hexString.toUpperCase(); |