This file contains hidden or 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
| # To minimize bugs, include this comment: | |
| # | |
| # | |
| # _oo0oo_ | |
| # o8888888o | |
| # 88" . "88 | |
| # (| -_- |) | |
| # 0\ = /0 | |
| # ___/`---'\___ | |
| # .' \| |// '. |
This file contains hidden or 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 ( | |
| git "github.com/libgit2/git2go" | |
| "log" | |
| ) | |
| func credentialsCallback(url string, username string, allowedTypes git.CredType) (git.ErrorCode, *git.Cred) { | |
| ret, cred := git.NewCredSshKey("git", "/home/vagrant/.ssh/id_rsa.pub", "/home/vagrant/.ssh/id_rsa", "") | |
| return git.ErrorCode(ret), &cred |
This file contains hidden or 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 ( | |
| "errors" | |
| "fmt" | |
| "os" | |
| "strings" | |
| "os/exec" | |
| ) |
This file contains hidden or 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/python | |
| import sys | |
| def to_bin(st): | |
| return ' '.join(format(ord(x), 'b') for x in st) | |
| def main(argv): | |
| for x in argv[1:]: | |
| print to_bin(x) |
This file contains hidden or 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/python | |
| def chunker(seq, size): | |
| return (seq[pos:pos + size] for pos in xrange(0, len(seq), size)) | |
| def word_to_ord(s): | |
| ret = '' | |
| for i in s: | |
| ret += str(ord(i)) | |
| return ret |
This file contains hidden or 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 | |
| # autossh.x86_64 1.4e-1.el7 @epel | |
| # puppetlabs-stdlib.noarch 4.5.1-2.20150121git7a91f20.el7 @epel | |
| IFS=$'\n' | |
| get_filename() { | |
| local line=$1 | |
| echo $i | awk '{ |
This file contains hidden or 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 | |
| start() { | |
| echo "Starting" | |
| } | |
| stop() { | |
| echo "Stopping" | |
| } |
This file contains hidden or 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" | |
| "time" | |
| ) | |
| func getDurationDiff(t time.Time, duration string) (time.Time, error) { | |
| dur, err := time.ParseDuration(fmt.Sprintf("-%s", duration)) | |
| if err != nil { | |
| return time.Now(), err |
This file contains hidden or 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 ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" |
This file contains hidden or 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 <sstream> | |
| #include <iostream> | |
| #include <numeric> | |
| #include <string> | |
| #include <iostream> | |
| std::string &righttrim(std::string &s) { | |
| s.erase(std::find_if(s.rbegin(), s.rend(), | |
| std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end()); | |
| return s; |