- Create a new directory.
- Download script.sh.
- Create a folder in that directory called images.
- Dump all images (whatever includegraphics can accept) that you want to combine in there.
- Run script
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 "testing" | |
| type A interface { | |
| x(key interface{}) interface{} | |
| } | |
| type B struct { | |
| A |
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 | |
| type foo func(int, int) | |
| func (f foo) bar(x int) { | |
| f (x, x) | |
| } | |
| func main() { | |
| add := func (x int, y int) { |
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
| // Cannot use short assignments when dealing with structs | |
| package main | |
| type foo struct { | |
| stuff int | |
| } | |
| func main() { | |
| foo.stuff, a := 1,2 | |
| println(a) |
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 ( | |
| "golang.org/x/net/context" | |
| "github.com/stretchr/testify/mock" | |
| ) | |
| type Foo interface { | |
| Bar (ctx context.Context) (string) | |
| } |
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
| function memoize(fn) { | |
| var invocationCache = {}; | |
| return function() { | |
| var args = Array.prototype.slice.call(arguments); | |
| var cachedValue = invocationCache[args]; | |
| if (cachedValue !== undefined) { | |
| return cachedValue; | |
| } | |
| var result = fn.apply(null, arguments); | |
| invocationCache[args] = result; |
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
| import org.scalatest.mock.MockitoSugar | |
| /** | |
| * This explores self type and the cake pattern | |
| * | |
| * The recipe: | |
| * 1) Create a trait component | |
| * 2) Declare any dependent components using self-types | |
| * 3) Create the trait | |
| * 4) Create an abstract val that will be instantiated with an instance of the component |
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
| var gulp = require('gulp'), | |
| connect = require('gulp-connect'); | |
| watch = require('gulp-watch'); | |
| gulp.task('watch', function() { | |
| watch(['*.html','js/*.js']).pipe(connect.reload()); | |
| }); | |
| gulp.task('server', function(done) { |
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
| SetTitleMatchMode, 2 | |
| #IfWinActive Zim ahk_class gdkWindowToplevel | |
| !1:: | |
| SendInput, {AppsKey}e{Tab}{Tab}{Tab}{Tab}100{Enter}{Enter} | |
| return | |
| !2:: | |
| SendInput, {AppsKey}e{Tab}{Tab}{Tab}{Tab}200{Enter}{Enter} | |
| return | |
| !3:: |
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
| # Taken from http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256/12525165#12525165 | |
| import base64 | |
| import hashlib | |
| from Crypto import Random | |
| from Crypto.Cipher import AES | |
| class AESCipher(object): | |
| def __init__(self, key): |