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" | |
"github.com/spf13/cobra" | |
) | |
var cmdRoot = &cobra.Command{ | |
Run: func(*cobra.Command, []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
#!/bin/bash | |
TMP_AVI=$(mktemp /tmp/outXXXXXXXXXX.avi) | |
ffcast -w % ffmpeg -y -f x11grab -show_region 1 -framerate 15 \ | |
-video_size %s -i %D+%c -codec:v huffyuv \ | |
-vf crop="iw-mod(iw\\,2):ih-mod(ih\\,2)" $TMP_AVI \ | |
&& convert -set delay 10 -layers Optimize $TMP_AVI out.gif |
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" | |
"os" | |
"github.com/fd0/throttle" | |
) | |
func main() { |
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/build.go b/build.go | |
index ec55660..8a041df 100644 | |
--- a/build.go | |
+++ b/build.go | |
@@ -291,6 +291,12 @@ func (cs Constants) LDFlags() string { | |
} | |
func main() { | |
+ ver := runtime.Version() | |
+ if strings.HasPrefix(ver, "go1") && ver < "go1.7" { |
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" | |
"os" | |
"github.com/pkg/xattr" | |
) | |
func main() { |
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 | |
set -e | |
cleanup() { | |
rm -rf -- "$DATA_DIR" | |
} | |
DATA_DIR=$(mktemp -d "${TMP:-/tmp}/google-chrome-XXXXXXXX") | |
trap cleanup EXIT | |
touch "${DATA_DIR}/First Run" | |
chrmm --user-data-dir="$DATA_DIR" --incognito "$@" |
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" | |
"github.com/pkg/xattr" | |
"os" | |
) | |
func main() { | |
attr, err := xattr.Listxattr(os.Args[1]) |
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
func (node Node) sameExtendedAttributes(other Node) bool { | |
if len(node.ExtendedAttributes) != len(other.ExtendedAttributes) { | |
return false | |
} | |
// build a set of all attributes that node has | |
type mapvalue struct { | |
value []byte | |
present bool | |
} |
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" | |
"os" | |
"github.com/pkg/xattr" | |
) | |
func main() { |
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" | |
"io" | |
"os" | |
"github.com/restic/chunker" | |
) |