Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Use at least one worker per core | |
worker_processes 16 | |
# Help ensure your application will always spawn in the symlinked "current" directory that Capistrano sets up | |
working_directory "/var/www/apps/superfeedr.com/current" | |
# Listen on a Unix domain socket, use the default backlog size | |
listen "/tmp/unicorn.sock", :backlog => 1024 | |
# Nuke workers after 30 seconds instead of 60 seconds (the default) |
tcp_syslog is now a gem : | |
https://github.com/tech-angels/tcp_syslog |
// includes bindings for fetching/fetched | |
var PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
typeof(options) != 'undefined' || (options = {}); | |
this.page = 1; | |
typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
}, | |
fetch: function(options) { |
diff --git a/gc.c b/gc.c | |
--- a/gc.c | |
+++ b/gc.c | |
@@ -77,6 +77,41 @@ void *alloca (); | |
#ifndef GC_MALLOC_LIMIT | |
#define GC_MALLOC_LIMIT 8000000 | |
#endif | |
+#define HEAP_MIN_SLOTS 10000 | |
+#define FREE_MIN 4096 | |
+ |
--- a/load.c 2010-10-23 05:36:38.000000000 -0400 | |
+++ b/patchload.c 2011-06-05 08:58:00.000000000 -0400 | |
@@ -40,14 +40,6 @@ | |
VALUE ary; | |
long i; | |
- for (i = 0; i < RARRAY_LEN(load_path); ++i) { | |
- VALUE str = rb_check_string_type(RARRAY_PTR(load_path)[i]); | |
- if (NIL_P(str) || !rb_is_absolute_path(RSTRING_PTR(str))) | |
- goto relative_path_found; |
module ValueObject | |
def self.new(*attrs) | |
klass = Class.new(Object) | |
klass.send(:attr_reader, *attrs) | |
klass.send(:define_method, :initialize) do |*args| | |
raise ArgumentError, "wrong number of arguments (#{args.size} for #{attrs.size})" unless args.size == attrs.size | |
attrs.each_with_index do |attr, idx| | |
instance_variable_set("@#{attr}", args[idx]) |
def select_from_chosen(item_text, options) | |
field = find_field(options[:from]) | |
option_value = page.evaluate_script("$(\"##{field[:id]} option:contains('#{item_text}')\").val()") | |
page.execute_script("$('##{field[:id]}').val('#{option_value}')") | |
end |
" Set colorscheme to solarized | |
colorscheme solarized | |
" Change the Solarized background to dark or light depending upon the time of | |
" day (5 refers to 5AM and 17 to 5PM). Change the background only if it is not | |
" already set to the value we want. | |
function! SetSolarizedBackground() | |
if strftime("%H") >= 5 && strftime("%H") < 17 | |
if &background != 'light' | |
set background=light |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// A. Cannot use type switch outside of a switch statement | |
type PolarVortex interface {} | |
func main() { | |
var p PolarVortex = new(PolarVortex) | |
var s = p.(type) // compilation error => use of .(type) outside type switch | |
} | |