Skip to content

Instantly share code, notes, and snippets.

Avatar

Dion Almaer dalmaer

View GitHub Profile
@dalmaer
dalmaer / WhyRunAnOpenSourceProgram.md
Last active Aug 29, 2015
Some thoughts on why a company should consider running an open source program.
View WhyRunAnOpenSourceProgram.md

Why run an open source program?

Why would a company spend resources on an open source program, and why is it really needed?

These are great questions, and my point of view has probably changed in some ways over time. I have been involved in open source since the start of my engineering career, participating with great open source foundations such as Apache, and then seeing a prototypical example when I got to join Chris DiBona’s open source program office at Google. This is truly learning from the master. Not only is Chris on the list of “I would work for that guy again in a heart beat!” but he was fantastic at providing the frameworks that allowed engineers to get the most out of open source, while also helping the business.

Back then, the tooling and pervasiveness of open source wasn’t quite where it is today, hence Google Code and other solutions coming out of the open source group.

Let’s fast forward to today.

View keybase.md

Keybase proof

I hereby claim:

  • I am dalmaer on github.
  • I am dalmaer (https://keybase.io/dalmaer) on keybase.
  • I have a public key whose fingerprint is 0C48 9C88 E848 8F41 F5B3 9150 EB15 FC08 4107 119D

To claim this, I am signing this object:

@dalmaer
dalmaer / lispyexamples.ls
Created Jun 20, 2012
Samples for LispyScript
View lispyexamples.ls
// All Javascript functions, objects and literals can be used in LispyScript.
(Array.prototype.forEach.call [1, 2, 3]
(function (elem index list)
(console.log elem)))
// You can access object methods and properties using the "." notation.
(console.log (.greet {greet: "hello"}))
// You can also use the 'get' expression to access a property of an object.
(console.log (get "greet" {greet: "hello"}))
@dalmaer
dalmaer / node.delay2.js
Created Jun 11, 2012
A dumb example of delaying some content to see chunked encoding (with extra data for WebKit)
View node.delay2.js
var http = require('http')
http.createServer(function (request, response) {
response.writeHead(200, {
'Content-Type': 'text/html',
'Transfer-Encoding': 'chunked'
})
response.write("<html><head><title>delay</title></head><body><div id=before>before</div>\n" + Array(160).join("&nbsp;") + "\n")
@dalmaer
dalmaer / node.delay1.js
Created Jun 11, 2012
A dumb example of delaying some content to see chunked encoding
View node.delay1.js
var http = require('http')
http.createServer(function (request, response) {
response.writeHead(200, {
'Content-Type': 'text/html',
'Transfer-Encoding': 'chunked'
})
response.write("<html><head><title>delay</title></head><body><div id=before>before</div>\n")
View imageset.css
selector {
background: image-set(url(foo-lowres.png) 1x,
url(foo-highres.png) 2x) center;
}
View retinadownload.html
<link rel="stylesheet" type="text/css" href="retina.css" media="only screen and (-webkit-min-device-pixel-ratio: 2)">
<link rel="stylesheet" type="text/css" href="regular.css" media="screen">
View connect2.sample.js
var connect = require('connect')
, http = require('http')
, https = require('https');
var app = connect()
.use(connect.logger('dev'))
.use(connect.static('public'))
.use(function(req, res){
res.end('hello world\n');
})
View find2.json
$ find . -type f
./android/cb188f8/native-hello-world.css
./android/cb188f8/native-hello-world.js
./android/cb188f8/native-hello-world@1.5x.css
./android/index.html
./ipad/cb188f8/native-hello-world.css
./ipad/cb188f8/native-hello-world.js
./ipad/index.html
./iphone/cb188f8/native-hello-world.css
./iphone/cb188f8/native-hello-world.js
View find1.sh
$ find . -type f
./android/index.html
./android/native-hello-world.css
./android/native-hello-world.js
./android/native-hello-world@1.5x.css
./ipad/index.html
./ipad/native-hello-world.css
./ipad/native-hello-world.js
./iphone/index.html
./iphone/native-hello-world.css