- Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
- rabl - General ruby templating with json, bson, xml, plist and msgpack support
- Thin - Very fast and lightweight Ruby web server
- Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
- SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
- Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
- [factory_girl](h
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
<?php | |
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { | |
trigger_error("CakePHP core could not be found.", E_USER_ERROR); | |
} | |
Configure::write('debug', 0); | |
$version = Configure::version(); | |
if (preg_match('/^1.2/', $version)) { | |
$corePath = Configure::corePaths('cake'); |
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
#!/bin/sh | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: 35 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# config: /etc/sysconfig/nginx |
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
var doTask = function (value, callback) { | |
setTimeout(callback(value), 10); | |
}; | |
var list_count = 100000; | |
var check_count = list_count / 10; | |
var list = []; | |
for (var i = 0; i < list_count; i++) list.push(i); | |
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
var fs = require('fs'); | |
var INTERVAL = 1000; | |
var cycle_stop = false; | |
var daemon = false; | |
var timer; | |
process.argv.forEach(function (arg) { | |
if (arg === '-d') daemon = true; |
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
module.exports = function(grunt) { | |
var pkg = grunt.file.readJSON('package.json'); | |
grunt.initConfig({ | |
browserify: { | |
dist: { | |
src: 'main.js', | |
dest: 'build.js' | |
} | |
} |
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
var angular = require('angular'); | |
module.exports = angular.module('myapp', [ | |
require('./item').name, | |
require('./sample').name | |
]); |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# go test -bench . -benchmem | |
goos: darwin | |
goarch: amd64 | |
BenchmarkMap1-4 100000 24314 ns/op 2800 B/op 280 allocs/op | |
BenchmarkMap2-4 50000 25083 ns/op 2800 B/op 280 allocs/op |
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
#!/usr/bin/env ruby | |
ARGF.each do |line| | |
case line.chomp | |
when /^\s+Prefix/, "" then | |
# header | |
when /^Routes for / | |
# fin routes. | |
break | |
when /^\s*(?:(\w+) )?(GET|POST|PUT|PATCH|DELETE)\s+(\S+)\s+([\w\/]+)#(\w+)/ then |
OlderNewer