Create and store a 512-byte random encryption key named secret:
$ mkkey secret
Encrypt the contents of file with the secret key and write it to file.enc:
$ encrypt secret < file > file.enc
| package main | |
| /* | |
| #cgo CFLAGS: -x objective-c | |
| #cgo LDFLAGS: -framework Cocoa | |
| #import <Cocoa/Cocoa.h> | |
| int | |
| StartApp(void) { | |
| [NSAutoreleasePool new]; |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| #!/usr/bin/env ruby | |
| # Add your gems here | |
| # | |
| gemfile_contents = <<-EOF | |
| source "http://rubygems.org" | |
| gem "fog" | |
| gem "yajl-ruby" | |
| EOF |
| # Simple, scrappy UDP DNS server in Ruby (with protocol annotations) | |
| # By Peter Cooper | |
| # | |
| # MIT license | |
| # | |
| # * Not advised to use in your production environment! ;-) | |
| # * Requires Ruby 1.9 | |
| # * Supports A and CNAME records | |
| # * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance | |
| # * All records get the same TTL |
| # ## Backbone model caching | |
| # This is a simple solution to the problem "how do I make less requests to | |
| # my server?". | |
| # | |
| # Whenever you need a model instance, this will check first if the same thing | |
| # has been fetched before, and gives you the same instance instead of fetching | |
| # the same data from the server again. | |
| # | |
| # Reusing the same instance also has the great side-effect of making your | |
| # model changeable from one part of your code, with your changes being available |
| #!/usr/bin/env ruby | |
| # Usage: gitio URL [CODE] | |
| # | |
| # Turns a github.com URL | |
| # into a git.io URL | |
| # | |
| # Copies the git.io URL to your clipboard. | |
| url = ARGV[0] | |
| code = ARGV[1] |