Skip to content

Commit b54324f

Browse files
committed
Added clean Web.config and script for rewriting history (purge.sh).
1 parent f3ba3b6 commit b54324f

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

OAuth2.Example/Web.config

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0"?>
2+
3+
<configuration>
4+
<configSections>
5+
<section name="oauth2" type="OAuth2.Configuration.OAuth2ConfigurationSection, OAuth2, Version=0.1.*, Culture=neutral"/>
6+
</configSections>
7+
8+
<oauth2>
9+
<services>
10+
<add clientType="GoogleClient"
11+
clientId="000000000000.apps.googleusercontent.com"
12+
clientSecret="AAAAAAAAAAAAAAAAAAAAAAAA"
13+
scope="https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"
14+
redirectUri="http://mymachine.net:53023/Auth" />
15+
<add clientType="FacebookClient"
16+
clientId="000000000000000"
17+
clientSecret="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
18+
scope="email"
19+
redirectUri="http://mymachine.net:53023/Auth" />
20+
<add clientType="VkClient"
21+
clientId="0000000"
22+
clientSecret="aaaaaaaaaaaaaaaaaaaa"
23+
scope="offline"
24+
redirectUri="http://mymachine.net:53023/Auth" />
25+
<add clientType="TwitterClient"
26+
clientId="AAAAAAAAAAAAAAAAAAAAAA"
27+
clientSecret="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
28+
redirectUri="http://mymachine.net:53023/Auth" />
29+
<add clientType="LinkedinClient"
30+
clientId="aaaaaaaaaaaa"
31+
clientSecret="AAAAAAAAAAAAAAAA"
32+
redirectUri="http://mymachine.net:53023/Auth" />
33+
</services>
34+
</oauth2>
35+
36+
<appSettings>
37+
<add key="webpages:Version" value="1.0.0.0"/>
38+
<add key="ClientValidationEnabled" value="true"/>
39+
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
40+
</appSettings>
41+
42+
<system.web>
43+
<compilation debug="true" targetFramework="4.0">
44+
<assemblies>
45+
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
46+
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
47+
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
48+
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
49+
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
50+
</assemblies>
51+
</compilation>
52+
53+
<pages>
54+
<namespaces>
55+
<add namespace="System.Web.Helpers" />
56+
<add namespace="System.Web.Mvc" />
57+
<add namespace="System.Web.Mvc.Ajax" />
58+
<add namespace="System.Web.Mvc.Html" />
59+
<add namespace="System.Web.Routing" />
60+
<add namespace="System.Web.WebPages"/>
61+
</namespaces>
62+
</pages>
63+
</system.web>
64+
65+
<system.webServer>
66+
<validation validateIntegratedModeConfiguration="false"/>
67+
<modules runAllManagedModulesForAllRequests="true"/>
68+
</system.webServer>
69+
70+
<runtime>
71+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
72+
<dependentAssembly>
73+
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
74+
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
75+
</dependentAssembly>
76+
</assemblyBinding>
77+
</runtime>
78+
</configuration>

purge.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -o errexit
3+
4+
# Author: David Underhill
5+
# Script to permanently delete files/folders from your git repository. To use
6+
# it, cd to your repository's root and then run the script with a list of paths
7+
# you want to delete, e.g., git-delete-history path1 path2
8+
9+
if [ $# -eq 0 ]; then
10+
exit 0
11+
fi
12+
13+
# make sure we're at the root of git repo
14+
if [ ! -d .git ]; then
15+
echo "Error: must run this script from the root of a git repository"
16+
exit 1
17+
fi
18+
19+
# remove all paths passed as arguments from the history of the repo
20+
files=$@
21+
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $files" HEAD
22+
23+
# remove the temporary history git-filter-branch otherwise leaves behind for a long time
24+
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune

0 commit comments

Comments
 (0)