Skip to content

Instantly share code, notes, and snippets.

View crpietschmann's full-sized avatar
🌍
We are all human!

Chris Pietschmann crpietschmann

🌍
We are all human!
View GitHub Profile
@kevinhillinger
kevinhillinger / template.json
Last active November 26, 2020 09:37
Resource Manager (ARM) Template with copyIndex variable to output
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageSettings": {
"type": "object",
"defaultValue": {
"count": 3,
"prefix": "baa"
}
@SidneyAndrewsOpsgility
SidneyAndrewsOpsgility / ClockService.svc
Created September 10, 2015 19:05
This is a WCF service hosted in ASP.NET (using an SVC file) that can be used with Service Bus Relay. You must add the Service Bus NuGet packages to get this to work
<%@ ServiceHost Language="C#" Debug="true" Service="WcfTest.Services.ClockService" CodeBehind="ClockService.svc.cs" %>
@paully21
paully21 / aspnetmvc_discourse_sso.cs
Created February 26, 2014 16:25
ASP.NET MVC Discourse SSO Example
public ActionResult DiscourseLogin()
{
if (string.IsNullOrEmpty(Request.QueryString["sso"]) || string.IsNullOrEmpty(Request.QueryString["sig"]))
return Content("Invalid");
string ssoSecret = "YOUR SSO SECRET"; //must match sso_secret in discourse settings
string sso = Request.QueryString["sso"];
string sig = Request.QueryString["sig"];
@masnun
masnun / alexa.py
Created July 24, 2012 16:02
Python One-liner to get your site's Alexa Rank
#!/usr/bin/env python
import urllib, sys, bs4
print bs4.BeautifulSoup(urllib.urlopen("http://data.alexa.com/data?cli=10&dat=s&url="+ sys.argv[1]).read(), "xml").find("REACH")['RANK']