Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
var code, codeWithoutAsserts, fs, jsAst, map, mkdirp, path, _ref;
fs = require('fs');
path = require('path');
var get = Ember.get;
/**
@extends Ember.Mixin
Implements common pagination management properties for controllers.
*/
Ember.PaginationSupport = Ember.Mixin.create({
/**
*/
@michiel
michiel / sh
Created June 12, 2013 16:44
bash rename js files to coffee
#!/bin/bash
for files in *.js
do
mv "$files" "${files%.js}.coffee"
done
@michiel
michiel / json-unmarshal.go
Last active December 17, 2015 22:59
JSON unmarshal in go
package main
import (
"fmt"
"encoding/json"
"os"
"io/ioutil"
)
/*
@michiel
michiel / newton_sqrt.go
Created May 31, 2013 04:11
Newton's sqrt approximation method in Go
func sqrt(x float64) (y float64) {
y = 1
for i := 0; i < 10; i++ {
y = y - ((y*y - x) / (2*y))
}
return
}
@michiel
michiel / interface_ex.go
Last active December 17, 2015 22:38
Interface example in Go
package main
import (
"fmt"
"math"
)
type Shaper interface {
SurfaceArea() float64
Volume() float64
@michiel
michiel / newton_sqrt.coffee
Created May 31, 2013 01:28
Newton's square root method in coffeescript
sqrt = (x, conv=10)->
y = 1
for i in [0..conv]
y = y - ((y*y - x) / (2*y))
y
{
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.coffee",
"template": "App.%S = DS.Model.extend"
},
"app/assets/javascripts/controllers/*_controller.coffee": {
"command": "jcontroller",
"alternate": "spec/javascripts/controllers/%s_spec.coffee",

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang ([email protected]). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes