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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '~> 4.1' | |
gem 'pg' | |
GEMFILE | |
system 'bundle' | |
end |
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
//------------ | |
//jQueryNS.js | |
//------------ | |
$.ns = function(namespace) { | |
var names = namespace.split('.'), context = window || global, name = null; | |
while (name = names.shift()) | |
context = context[name] === undefined ? context[name] = {} : context[name]; | |
return context; | |
}; |
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
public class GeocoderWrapper { | |
private final Geocoder geocoder; | |
private String currentSearchTerm; | |
public interface GeocodeCompletionCallback { | |
void onGeocode(BoundingBox box); | |
} |
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
import sbt._ | |
class Plugins(info: ProjectInfo) extends PluginDefinition(info) { | |
val appenginePlugin = "net.stbbs.yasushi" % "sbt-appengine-plugin" % "2.1" from "http://github.com/downloads/Yasushi/sbt-appengine-plugin/sbt-appengine-plugin-2.1.jar" | |
val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" | |
val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1-SNAPSHOT" | |
} |
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
public class ShareWidget extends Composite { | |
private static ShareWidgetUiBinder uiBinder = GWT.create(ShareWidgetUiBinder.class); | |
interface ShareWidgetUiBinder extends UiBinder<Widget, ShareWidget> { | |
} | |
public ShareWidget() { | |
initWidget(uiBinder.createAndBindUi(this)); | |
} |
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
public static BoundingBox from(List<Point> points) { | |
Preconditions.checkArgument(!points.isEmpty()); | |
GeoPt base = points.get(0).getPosition(); | |
Position southWestBase = Position.from(base); | |
Position northEastBase = Position.from(base); | |
for (Point point : points) { | |
southWestBase = southWestBase.moveSouthWest(Position.from(point.getPosition())); | |
northEastBase = northEastBase.moveNorthEast(Position.from(point.getPosition())); | |
} | |
return new BoundingBox(southWestBase, northEastBase); |
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
#!/opt/local/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python | |
import os | |
join = os.path.join | |
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__))) | |
base = os.path.dirname(base) | |
import sys |
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
use ActionDispatch::Static | |
use Rack::Chunked | |
use Rack::Deflater | |
use Rack::Lock | |
use #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x000001048a2258> | |
use Rack::Runtime | |
use Rack::MethodOverride | |
use Rails::Rack::Logger | |
use ActionDispatch::ShowExceptions | |
use ActionDispatch::RemoteIp |
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 com.twu; | |
public class Rectangle { | |
private final int length; | |
private final int breadth; | |
public Rectangle(int length, int breadth) { | |
this.length = length; | |
this.breadth = breadth; |
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 com.twu; | |
public class Square extends Rectangle { | |
public Square(int side) { | |
super(side, side); | |
} | |
} |
OlderNewer