Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
public static string ToMD5(this string input) | |
{ | |
//comment about this | |
var sb = new System.Text.StringBuilder(); | |
//comment about that | |
var md5 = System.Security.Cryptography.MD5.Create(); | |
var bytesFromInput = System.Text.Encoding.Unicode.GetBytes(input); | |
var hashedBytes = md5.ComputeHash(bytesFromInput); | |
require 'rubygems' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'date' | |
require 'uri' | |
# usage: ruby import.rb my-blog.xml | |
# my-blog.xml is a file from Settings -> Basic -> Export in blogger. | |
data = File.read ARGV[0] |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using FluentAssertions; | |
using NUnit.Framework; | |
using Nancy.Helpers; | |
namespace NancySelfHosting |
Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.
var BaseView = Backbone.View.extend({ | |
close: function() { | |
this.closeSubviews(); | |
this.unbindFromAll(); | |
this.off(); | |
this.remove(); | |
if (this.onClose) this.onClose(); | |
}, |
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |