Skip to content

Instantly share code, notes, and snippets.

View pietrobasso's full-sized avatar

Pietro Basso pietrobasso

View GitHub Profile

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.
@tgsoverly
tgsoverly / merge-xml-coverage.py
Created May 8, 2015 13:12
Merge Cobertura XML's
import sys
import os
import xml.etree.ElementTree as ET
import logging
import re
from shutil import copyfile
from optparse import OptionParser
### This file came from the https://github.com/flow123d/flow123d repo they were nice enough to spend time to write this.
### It is copied here for other people to use on its own.
@gurgeous
gurgeous / CGMath.swift
Last active April 13, 2021 15:52
missing operators for CGPoint, CGSize and CGRect
//
// MARK: CGPoint op point/size/float
//
func -(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x - r.x, y: l.y - r.y) }
func +(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x + r.x, y: l.y + r.y) }
func *(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x * r.x, y: l.y * r.y) }
func /(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x / r.x, y: l.y / r.y) }
func -(l: CGPoint, r: CGSize) -> CGPoint { return CGPoint(x: l.x - r.width, y: l.y - r.height) }
/*
Swift Programming Language Guide
"A Swift Tour" Solutions
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-XID_1
These are the solutions to all the "experiments" in the pre-release Swift Programming Guide
(released on the same day Apple announced Swift). A couple of things worth noting:
1. Swift syntax, e.g. array declarations, has changed since I releasd these. So this code will
probably cause some errors when you paste it into a playground. Should be easy enough to fix
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@gregfu
gregfu / gist:1524894
Created December 27, 2011 19:35 — forked from shazron/gist:943736
About XCode 4 Project Template (How To Create Custom Project Template)
From: http://snipt.net/yonishin/about-xcode-4-project-template
XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates
Examples:
/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate