Skip to content

Instantly share code, notes, and snippets.

@balupton
balupton / README.md
Last active April 20, 2022 13:21
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
@motowilliams
motowilliams / ServiceStackTextFormatter.cs
Created February 22, 2012 04:03
aspnet web api json MediaTypeFormatter using Servicestack.Text
public class ServiceStackTextFormatter : MediaTypeFormatter
{
public ServiceStackTextFormatter()
{
// Fill out the mediatype and encoding we support
SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/json"));
Encoding = new UTF8Encoding(false, true);
}
protected override Task<object> OnReadFromStreamAsync(Type type, Stream stream, HttpContentHeaders contentHeaders, FormatterContext formatterContext)
@prabirshrestha
prabirshrestha / wildcard.csproj
Created August 24, 2012 19:37
wildcard *.cs file include in .csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F1F3A37D-3372-446D-966E-DB01F710AA55}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
@davidfowl
davidfowl / gist:4559450
Created January 17, 2013 20:29
Generate urls properly on appharbor.
<appSettings>
<add key="aspnet:UseHostHeaderForRequestUrl" value="true"/>
</appSettings>
@dankrause
dankrause / _hover_example.py
Last active June 26, 2024 22:35
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)
@diego898
diego898 / rd.md
Last active October 13, 2020 21:18
Enable Concurrent Remote Desktop Users in Windows 8.1 x64

thanks to @neurodyne and this link for updated instructions

This works with the following versions of termsrv.dll

x64 - termsrv.dll - 6.3.9600.17095

Find Replace
39813C0600000F849E310500 B80001000089813806000090
090085C07F078BD8 090085C090908BD8
# grunt-newer:
# Check for newer @import .less files example
# See: https://github.com/tschaub/grunt-newer/issues/29
newer: {
options: {
/**
* when changing a less file, we run an addional check on all the *.less files to see if they are @importing a modified *.less file, and if so we include it in the files which less task should execute.
*/
override: function(details, shouldIncludeCallback) {