Skip to content

Instantly share code, notes, and snippets.

View opensas's full-sized avatar
🏠
Available for freelance jobs

opensas opensas

🏠
Available for freelance jobs
View GitHub Profile
@Rich-Harris
Rich-Harris / http-apis.md
Last active November 3, 2022 09:02
Next-gen Node HTTP APIs

I saw this poll on Twitter earlier and was surprised at the result, which at the time of writing overwhelmingly favours option 1:

Screen Shot 2020-09-10 at 10 19 22 AM

I've always been of the opinion that the (req, res, next) => {} API is the worst of all possible worlds, so one of two things is happening:

  • I'm an idiot with bad opinions (very possibly!)
  • People like familiarity
@swyxio
swyxio / readme.md
Last active May 11, 2022 07:58
notes on how to video tutorial like a pro - https://www.youtube.com/watch?v=9lPjY-JGZDY

Notes for gregg pollack's https://www.youtube.com/watch?v=9lPjY-JGZDY

Tools: AUDIO > Video. Use a good mic. Film yourself w/ natural light & good backdrop when explaining ideas. Use Screenflow, high res monitor (for zooming). Hire a film editor. Keynote/powerpoint. Use Animations! Get everything captioned!

Instructional Design:

  • Describe the problem first, dont just teach syntax.
  • Give Learning Objectives.
  • Show them what you're going to build, what they need to know
  • teach with visuals where needed
  • Show more than one example
@guardrex
guardrex / nutjob-webhostbuilder-pattern.cs
Last active September 2, 2017 15:03
My "NUTJOB" WebHostBuilder Pattern
/*
The purpose of this pattern is to consolidate all application
configuration into just ONE file and configure the app based
on the server/dev environment where it finds itself. It removes
the need for environment variables and/or JSON config files on
individual machines.
*/
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
@junosuarez
junosuarez / gist:3405873
Created August 20, 2012 17:07
New AMD Module: Sublime Text snippet
<snippet>
<content><![CDATA[/*global define: false */
define(
[${1:'app', 'backbone', 'lodash'}],
function (${2:App, B, _}) {
'use strict';
${3}
});]]></content>
@guillaumebort
guillaumebort / 1.sql
Created May 25, 2012 15:17
Play 2.0/Anorm
# --- !Ups
CREATE TABLE users(
email VARCHAR(255) NOT NULL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE subjects(
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
title LONGTEXT NOT NULL,
@arjones
arjones / User.java
Created December 28, 2011 03:49
Mapping from Microsoft Membership .NET 2.0 to PlayFramework
package models;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
@piotrze
piotrze / BaseJasperReport.java
Created August 13, 2011 12:55
Using jasper reports with play framework
package lib.reports;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.export.JExcelApiExporter;
@tmc
tmc / gist:828553
Created February 15, 2011 23:56
fixed up backbone example
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Backbone example</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="underscore.js"></script>
<script type="text/javascript" src="backbone.js"></script>