π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Google Forms Slack Notification | |
| // Andy Chase <github.com/andychase> | |
| // License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0> | |
| // Install 1: This code goes in ( tools > script editor... ) of your google docs form | |
| // Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] ) | |
| // Setup 1: Put your slack api url below | |
| var POST_URL = "https://hooks.slack.com/services/"; | |
| function onSubmit(e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # npm publish with goodies | |
| # prerequisites: | |
| # `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector json` | |
| # `np` with optional argument `patch`/`minor`/`major`/`<version>` | |
| # defaults to conventional-recommended-bump | |
| # and optional argument preset `angular`/ `jquery` ... | |
| # defaults to conventional-commits-detector | |
| np() { | |
| travis status --no-interactive && | |
| trash node_modules &>/dev/null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using Microsoft.Owin; | |
| using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>; | |
| using MidFunc = System.Func< | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>, | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>>; | |
| public static class ChaosMiddleware |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Disable the Lock Screen (the one before password prompt - to prevent dropping the first character) | |
| If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) { | |
| New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null | |
| } | |
| Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1 -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################## | |
| # Privacy Settings | |
| ################## | |
| # Privacy: Let apps use my advertising ID: Disable | |
| Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
| # To Restore: | |
| #Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
| # Privacy: SmartScreen Filter for Store Apps: Disable | |
| Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class AzureConManagerSqlPersistenceWireupExtensions | |
| { | |
| public static SqlPersistenceWireup UseInAzureConfiguredSqlPersistence(this Wireup wireup, string connectionName) | |
| { | |
| var factory = new AzureConfigurationConnectionFactory(connectionName); | |
| return new SqlPersistenceWireup(wireup, factory); | |
| } | |
| } | |
| public class AzureConfigurationConnectionFactory : ConfigurationConnectionFactory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static readonly string[] tenHoursOfFun = | |
| { | |
| "https://www.youtube.com/watch?v=wbby9coDRCk", | |
| "https://www.youtube.com/watch?v=nb2evY0kmpQ", | |
| "https://www.youtube.com/watch?v=eh7lp9umG2I", | |
| "https://www.youtube.com/watch?v=z9Uz1icjwrM", | |
| "https://www.youtube.com/watch?v=Sagg08DrO5U", | |
| "https://www.youtube.com/watch?v=5XmjJvJTyx0", | |
| "https://www.youtube.com/watch?v=IkdmOVejUlI", | |
| "https://www.youtube.com/watch?v=jScuYd3_xdQ", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <Project DefaultTargets="PrepareStaticContent" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <PropertyGroup> | |
| <!-- Passed in Parameters --> | |
| <configuration></configuration> | |
| <workingDir></workingDir> | |
| <buildNumber></buildNumber> | |
| <buildViews>false</buildViews> | |
| <minifyJs>true</minifyJs> | |
| <TargetsDirectory></TargetsDirectory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Query Kind="Program"> | |
| <NuGetReference Prerelease="true">Microsoft.Diagnostics.Runtime</NuGetReference> | |
| <Namespace>Microsoft.Diagnostics.Runtime</Namespace> | |
| <Namespace>System</Namespace> | |
| <Namespace>System.IO</Namespace> | |
| <Namespace>System.Linq</Namespace> | |
| <Namespace>System.Text</Namespace> | |
| <Namespace>Microsoft.Diagnostics.Runtime.Utilities</Namespace> | |
| </Query> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static List<T> Query<T>(this DataContext db, string sql, object param = null, int? commandTimeout = null, IDbTransaction transaction = null, [CallerFilePath]string fromFile = null, [CallerLineNumber]int onLine = 0, string comment = null) | |
| { | |
| using (db.Connection.EnsureOpen()) | |
| { | |
| try | |
| { | |
| return db.Connection.Query<T>(MarkSqlString(sql, fromFile, onLine, comment), param, transaction ?? db.Transaction, true, commandTimeout).AsDapperList(); | |
| } | |
| catch (SqlException ex) when (ex.Is(SqlErrorCode.DatabaseReadOnly_3906)) | |
| { |