Skip to content

Instantly share code, notes, and snippets.

@mikeal
mikeal / gist:9242748
Last active June 23, 2020 05:17
Response to Nodejitsu NPM Trademark

I've known people at nodejitsu for years, since before the company even existed. I still consider many of them friends. That said, somebody over there has lost their mind.

Trademarks are an important part of open source. They protect the integrity of the trust that is built by any project. A classic example of why this is the case is Firefox. Suppose that a malware producer takes the Firefox codebase, which is free and open source, packages up their malware with it and then releases it as "Firefox". Then they buy search advertising and suddenly their bad and malicious version of Firefox is the first result on search engines across the web. This is clearly a bad thing for Firefox and open source everywhere, but what can Mozilla do to protect their community of users?

They can't enforce a software license since the use is permitted under the Mozilla Public License. They can, however, enforce on these hypothetical bad actors using their trademark on the word "Fi

irb(main):034:0> D, Y = 8, 0
=> [8, 0]
irb(main):035:0> 8===D-- ( Y )
=> true
@gus
gus / a-bundler-whoa.markdown
Created October 25, 2010 14:32
Gus' Bundler Woes

I'm not sure what the feature is called in 0.9.26, so I'll describe it instead; essentially, I can package (vendor/cache) my gems for use in deployment and if during the deployment (bundle install vendor/bundle) a gem is found in the shared gems repo (managed through RVM gemsets per project) then that gem is used without unpacking it in vendor/bundle. This is useful to me because my ops dude pre-installs gems needing compilation on all of the systems needing it (managed through Puppet for now); these gems are currently unicorn and bson_ext.

You can argue that he just shouldn't do that and I won't argue back, but that's something he likes since he doesn't want to have to recompile unicorn, bson_ext, etc. for each system as deploys are running; we have a few systems to manage and the list is growing; we also have several services working together and not all are ruby, so he just wants simple deploys. I also can't argue too much with that as there are oodles of things he concerns himself with that I don't have/

# From mattetti's gc_stats.rb
# Basic middleware to help developers track their memory usage
# DO NOT USE IN PRODUCTION
# Currently only tested on Ruby 1.9 and no support guaranteed
# Output example:
#
# GC run, previous cycle was 255 requests ago.
#
@toothrot
toothrot / riot_example.rb
Created July 20, 2010 21:19 — forked from gus/riot_example.rb
dick jokes
require 'rubygems'
require 'riot'
context "Something" do
setup do
D = 8
end
asserts("big") { 8==D }
asserts("bigger") { 8===D }
@gus
gus / Rakefile
Created July 19, 2010 18:40
rackme
require 'rubygems'
require 'rake'
require 'pathname'
module ThumbleMonks
class Tastic # Formerly Rake::Static
def initialize(app, options={})
@app = app
@toothrot
toothrot / output.txt
Created July 9, 2010 21:45
how setups get run in Riot
context setups
+ asserts should only run the setup once
+ asserts even with multiple assertions
context setups that are nested
+ asserts gets run again
+ asserts only once per nesting, even with multiple assertions
4 passes, 0 failures, 0 errors in 0.000148 seconds
@gus
gus / ruby-coding-style.md
Created July 8, 2010 14:16
Coding in Ruby - mostly the Gus way

Hijacked from Christian Neukirchen's Ruby Style Guide

Coding in Ruby

These are guides, not rules. There are always reasons to not do something, but if you can stay on this road for as long as possible, at least Gus will be happy.

General

  • Use common sense.
  • Be consistent.
@gus
gus / index.txt
Created November 30, 2009 21:55 — forked from toothrot/index.txt
Ruby/Clojure analogs
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:
@gus
gus / interpreter.ml
Created November 10, 2009 20:15
OCaml Interpreter
type exp =
IntExp of int
| Builtin of (exp -> env -> exp)
| VarExp of string
| FunExp of string * exp
| LetExp of string * exp * exp
| IfExp of exp * exp * exp
| AppExp of exp * exp
and
env = (string * exp) list