Skip to content

Instantly share code, notes, and snippets.

View dalmaer's full-sized avatar

Dion Almaer dalmaer

View GitHub Profile
@dalmaer
dalmaer / WhyRunAnOpenSourceProgram.md
Last active February 6, 2022 20:28
Some thoughts on why a company should consider running an open source program.

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.

@dalmaer
dalmaer / keybase.md
Created March 26, 2014 17:15
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 June 20, 2012 16:16
Samples for LispyScript
// 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 June 11, 2012 04:59
A dumb example of delaying some content to see chunked encoding (with extra data for WebKit)
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 June 11, 2012 04:54
A dumb example of delaying some content to see chunked encoding
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")
selector {
background: image-set(url(foo-lowres.png) 1x,
url(foo-highres.png) 2x) center;
}
<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">
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');
})
$ 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
$ 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