This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventEmitter = require('events').EventEmitter; | |
module.exports = new EventEmitter(); | |
exports.emitSomethingLater = function() | |
setTimeout(function() { | |
module.exports.emit('something'); | |
}, 1000); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// General hints on defining types with constraints or invariants | |
// | |
// Just as in C#, use a private constructor | |
// and expose "factory" methods that enforce the constraints | |
// | |
// In F#, only classes can have private constructors with public members. | |
// | |
// If you want to use the record and DU types, the whole type becomes | |
// private, which means that you also need to provide: | |
// * a constructor function ("create"). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates new self-signed certificate for testing purposes | |
new-selfsignedcertificate -dnsname "*.domain.local" -friendlyname "*.domain.local Development Certificate" -certstorelocation "cert:\LocalMachine\My" -notafter (get-date).AddYears(100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SCHEMA [Geo] | |
GO | |
CREATE TABLE [Geo].[Continent]( | |
[Code] [char](2) NOT NULL PRIMARY KEY, | |
[Name] [nvarchar](25) NULL | |
) | |
GO | |
------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master | |
GO | |
IF OBJECT_ID('dbo.calendar') IS NOT NULL | |
DROP TABLE dbo.calendar; | |
IF OBJECT_ID('dbo.fn_generate_calendar') IS NOT NULL | |
DROP FUNCTION dbo.fn_generate_calendar; | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkHeader | |
{ | |
public string FirstLink { get; set; } | |
public string PrevLink { get; set; } | |
public string NextLink { get; set; } | |
public string LastLink { get; set; } | |
public static LinkHeader LinksFromHeader(string linkHeaderStr) | |
{ | |
LinkHeader linkHeader = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = new Ajax(); | |
function Ajax() { }; | |
Ajax.prototype.get = function (url, callback, error) { | |
var req = this.makeRequest('GET', url, callback, error); | |
req.send(); | |
}; | |
Ajax.prototype.post = function (url, data, callback, error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body, div, span, | |
h1,h2,h3,h4,h5,h6,hgroup, | |
ul,ol,dd, | |
p,figure, | |
pre,table,fieldset,hr, | |
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
font-size: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Downsample PDF and convert to gray if necessary. | |
Requires Ghostscript (gswin64c). | |
#> | |
param ( | |
[string]$indir, | |
[string]$outdir = $indir, | |
[string]$gs = "gswin64c", | |
[string]$dpi = "150" |
OlderNewer