Skip to content

Instantly share code, notes, and snippets.

View benatkin's full-sized avatar

Benjamin Atkin benatkin

View GitHub Profile
{
"extends": "program",
"counter": {
"extends": "loop",
"range": [1, 100],
"run": "logger"
},
"logger": function() {
console.log(this.counter);
},
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script>
</script>
@benatkin
benatkin / index.js
Created May 5, 2014 05:55
requirebin sketch
var Vue = require('vue')
var hill = require('hill')
var domify = require('domify')
var crete = require('crete')
var insertCss = require('insert-css')
var css = []
var blocks = []
// The Page
@benatkin
benatkin / index.js
Created May 6, 2014 07:49
requirebin sketch
var React = require('benatkin-react')
var v = require('validator')
var crete = require('crete')
var insertCss = require('insert-css')
insertCss(crete({
sel: 'input.invalid',
'background-color': '#f77'
}))
@benatkin
benatkin / index.js
Created May 7, 2014 03:07
requirebin sketch
var react = require('benatkin-react/addons')
var domify = require('domify')
var escapeHtml = require('escape-html')
document.body.appendChild(domify('<textarea rows="25" cols="80">' + escapeHtml(JSON.stringify(Object.keys(react.addons))) + '</textarea>'))
var gulp = require('gulp')
gulp.task('default', function(done) {
setTimeout(function() {
console.log('#suchwow')
setTimeout(function() {
console.log(' #sodoge')
setTimeout(function() {
console.log(' #manyamaze')
setTimeout(function() {
@benatkin
benatkin / index.js
Created May 8, 2014 00:54
requirebin sketch
var React = require('react-component')
var h = React.DOM
var _ = null;
var crete = require('crete')
var insertCss = require('insert-css')
var rulesets = [
{sel: '*', 'font-family': 'Helvetica, Arial, sans-serif'},
{sel: 'body > div', padding: '10px'},
{sel: 'ul, li',
@benatkin
benatkin / gen-rm-script
Last active August 29, 2015 14:01
script for removing some files
#!/usr/bin/env node
var fs = require('fs')
var dirs = fs.readdirSync('.')
dirs.forEach(function(dir) {
console.log('#rm -r ' + '"' + dir.replace('"', '"\'"\'"') + '"')
})
@benatkin
benatkin / lgpl.md
Last active August 29, 2015 14:01
Why you shouldn't use the Lesser GPL for your library

Many who start open source projects, especially those for companies, think that they can get around the obstacles to adoption of the GPL just by using the LGPL. While it removes some of the obstacles, it leaves others:

  • Complexity: The GPL and LGPL are both long and depend on definitions of concepts (such as Application, Library, and Combined Work) which are unclear in practice.
  • Reuse: The LGPL restricts taking a small part of code, modifying it, and publishing it with a library in a different license. This results in people who wish to use a different license having to start from scratch, or make the code boundaries clear, where it often doesn't make sense to do so. I see this happening with rich text editors where the major libraries are under the GPL or LGPL.

Instead of dual-licensing, do what many companies have and make the leap to the MIT or Apache2 licenses. Ghost and Meteor have.