Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Web;
using System.Web.Hosting;
namespace PdfGenerator
{
public class PdfGenerator
@echo off
: make-alias.cmd
if "%1" == "" goto usage:
for /F "usebackq" %%v in (`"powershell $M = ipmo -PassThru "%1" ; $M.ExportedCommands.Keys"`) do doskey %%v=powershell ipmo "%1" ; %%v $*
echo Aliases:
doskey /macros
goto done
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
In Flipboard's article[1], they kindly divulge their interpretation
of the summarization technique called LexRank[2].
While reading Flipboard's article, you can, if followed point by point,
reimplement their summarization algorithm.
Here are the steps/excerpts that stood out to me:
/// Markov chain that learns by observing data.
/// Let it observe a sequence of states.
/// Then you can ask it, given a state,
/// what are the probabilities of the next states occuring?
type MarkovChain (numStates : int) =
let mutable numObservations = 0
let mutable lastState = 0
let mutable matrix = Array2D.create numStates numStates (0, 0)
$/
  docs/
  src/
  tests/
  samples/
  artifacts/
  packages/
  build/
 lib/
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Rx ObservableAsPropertyHelper</Title>
<Shortcut>rxOAPH</Shortcut>
<Description>Code snippet for a ReactiveUI ObservableAsPropertyHelper</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
using System;
using System.IO;
using MonoTouch.Foundation;
using MonoTouch.AVFoundation;
using MonoTouch.CoreMedia;
namespace TestProject.Common
{
public class AudioTrim
{
@jdmonty
jdmonty / Test.cs
Last active August 29, 2015 14:21 — forked from jchannon/Test.cs
public class SomeFixture : IDisposable
{
private DockerClient client;
public SomeFixture()
{
Console.WriteLine("SomeFixture ctor: This should only be run once");
//Using https://github.com/ahmetalpbalkan/Docker.DotNet
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reactive.Linq;
using System.Text;
using System.Threading;
@jdmonty
jdmonty / nginx.conf
Created February 17, 2018 04:56 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048