Skip to content

Instantly share code, notes, and snippets.

View mcollina's full-sized avatar

Matteo Collina mcollina

View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@lancejpollard
lancejpollard / example.coffee
Created August 23, 2012 01:50
node.js domain module async error handling
(req, res, next) ->
# req and res are also created in the scope of serverDomain
# however, we'd prefer to have a separate domain for each request.
# create it first thing, and add req and res to it.
reqd = domain.create()
reqd.add(req)
reqd.add(res)
reqd.on "error", (er) ->
console.error "Error", er, req.url
try
@paymill
paymill / zahlungsformular.html
Created September 7, 2012 13:51
Zahlungsformular
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
var PAYMILL_PUBLIC_KEY = 'YOUR_PUBLIC_API_KEY';
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://bridge.paymill.de/"></script>
<script type="text/javascript">
@alexpacini
alexpacini / frontespizio.tex
Last active October 11, 2015 15:47
Frontespizio per tesi UNIBO
\documentclass[12pt,a4paper]{report}
\usepackage[italian]{babel}
\usepackage{bold-extra}
\textwidth=450pt\oddsidemargin=0pt
\begin{document}
\begin{titlepage}
\begin{center}
{{\Large{\textsc{Alma Mater Studiorum $\cdot$ Universit\`a di
Bologna}}}} \rule[0.1cm]{15.8cm}{0.1mm}
@mcollina
mcollina / bio.md
Last active June 14, 2023 16:07
Speaking Bio

Matteo Collina

Matteo is the Co-Founder and CTO of Platformatic.dev with the goal to remove all friction from backend development. He is also a prolific Open Source author in the JavaScript ecosystem and modules he maintain are downloaded more than 17 billion times a year. Previously he was Chief Software Architect at NearForm, the best professional services company in the JavaScript ecosystem. In 2014, he defended his Ph.D. thesis titled "Application Platforms for the Internet of Things". Matteo is a member of the Node.js Technical Steering Committee focusing on streams, diagnostics and http. He is also the author of the fast logger Pino and of the Fastify web framework. Matteo is an renowed international speaker after more than 60 conferences, including OpenJS World, Node.js Interactive, NodeConf.eu, NodeSummit, JSConf.Asia, WebRebels, and JsDay j

@LeaVerou
LeaVerou / dabblet.css
Created March 4, 2013 00:01
Switch-style checkboxes.
/**
* Switch-style checkboxes.
* Inspired by Espresso’s “Tools” switch
*/
input[type="checkbox"]:not(:checked),
input[type="checkbox"]:checked { /* :checked here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@adamvr
adamvr / .gitignore
Last active December 14, 2015 14:09
mqtt.js benching
node_modules
@benr
benr / gist:5505198
Created May 2, 2013 20:34
SmartOS Vagrant Box, first preview. Lacks VBox Extensions for disk sharing. (smartos-20130419T073558Z)
vagrant box add smartos http://cuddletech.com/tmp/smartos-latest.box
mkdir smartos && cd smartos
vagrant init smartos
vagrant up
vagrant ssh

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@joa
joa / code.js
Created June 6, 2013 12:17
Gmail Life Saver
function archiveInbox() {
var query = 'label:inbox is:read older_than:28d -label:unanswered -label:unread';
var batchSize = 100;
while(GmailApp.search(query, 0, 1).length == 1) {
GmailApp.moveThreadsToArchive(GmailApp.search(query, 0, batchSize));
}
}