<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
#!/usr/bin/env ruby | |
# Count lines of code in a pull request | |
# Usage: | |
# ./b/cloc_pr 22621 | |
# | |
# Code: +1212 / -208 | |
# Blank Lines: +241 / -18 | |
# Files: +17 / -0 | |
# Modified Files: 38 |
#!/usr/bin/env bash | |
set -eu | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' | |
CLEAR_LINE='\r\033[K' |
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
# This configuration will set up a database (db) and a web server (web) VM. | |
# Assumes the use of VirtualBox 4.3.14-95030 as a provider. | |
# Uses vagrant-vbguest plugin (https://github.com/dotless-de/vagrant-vbguest) | |
# to keep VirtualBox Guest Addition wrangled. | |
# Configuration | |
# Machine-specific configuration | |
DB_INSTALL_SCRIPT = "vagrant_data/db/install.sh" |
<!-- How about this? | |
This is super contrived. It's complex enough, however, to settle some of my concerns about Angular | |
(or any client-side framework). Basically, I want to see this with as little view logic as possible. | |
Overview: | |
A user is dropped into a two-step setup process: 1) account setup, and 2) spending categories setup. | |
When he completes those two steps, the group of accounts and group of categories should get moved to | |
a Home screen, where this little problem ends, but hypothetically he begins managing his finances. |
var express = require("express"), | |
app = express.createServer(express.logger()); | |
port = process.env.PORT || 3000; | |
app.configure(function(){ | |
app.use(express.methodOverride()); | |
app.use(express.bodyParser()); | |
app.use(express.static(__dirname + '/')); | |
app.use(express.errorHandler({ | |
dumpExceptions: true, |
Vagrant::Config.run do |config| | |
config.vm.provision :chef_solo do |chef| | |
chef.add_recipe("apache") | |
chef.add_recipe("php") | |
chef.arguments = "-l debug" | |
end | |
end |
<!DOCTYPE html> | |
<html ng-app="App"> | |
<head> | |
<meta name="description" content="AngularJS + jQuery UI Drag-n-Drop" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.1/angular.min.js"></script> | |
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> | |
<meta charset=utf-8 /> |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |