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"?> | |
<configuration> | |
<system.webServer> | |
<httpErrors errorMode="Detailed" /> | |
<asp scriptErrorSentToBrowser="true" /> | |
<rewrite> | |
<rules> | |
<rule name="Block text files" stopProcessing="true"> |
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 ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Target Name="NotifyRollbarOfDeploy" AfterTargets="MSDeployPublish;CopyAllFilesToSingleFolderForPackage"> | |
<XmlPeek XmlInputPath="$(_PackageTempDir)\web.config" | |
Query="//appSettings/add[@key='Rollbar.AccessToken']/@value"> | |
<Output TaskParameter="Result" ItemName="RollbarAccessToken" /> | |
</XmlPeek> | |
<XmlPeek XmlInputPath="$(_PackageTempDir)\web.config" | |
Query="//appSettings/add[@key='Rollbar.Environment']/@value"> | |
<Output TaskParameter="Result" ItemName="RollbarEnvironment" /> |
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
--- | |
- hosts: all | |
tasks: | |
- ufw: rule=allow port={{ item.port }} proto={{ item.proto }} | |
with_items: | |
- { port: 22, proto: tcp } | |
- { port: 80, proto: tcp } | |
- { port: 8080, proto: tcp } | |
- { port: 1953, proto: tcp } | |
- ufw: policy=deny state=enabled |
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
#!/bin/sh | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
# For Debian, run: update-rc.d -f nginx defaults | |
# For CentOS, run: chkconfig --add nginx | |
# | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all |
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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const sheetRouter = require('sheet-router') | |
const yo = require('yo-yo') | |
// default to `/404` if no path matches | |
const router = sheetRouter('/404', function (route) { | |
return [ | |
route('/', (params) => yo`<div>Welcome to router land!</div>`), |
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
export function hash(o: Object): Promise<any> { | |
var keys = Object.keys(o); | |
var promises = keys.map(key => Promise.resolve(o[key])); | |
return Promise.all(promises).then(function (values) { | |
return keys.reduce(function (hash, key, i) { | |
hash[key] = values[i]; | |
return hash; | |
}, {}); | |
}); |
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
var SuppressWarningPlugin = function (warningName, moduleName) { | |
this.warningName = warningName; | |
this.moduleName = moduleName; | |
}; | |
SuppressWarningPlugin.prototype.apply = function (compiler) { | |
var warningName = this.warningName; | |
var moduleName = this.moduleName; | |
compiler.plugin("emit", function (compilation, callback) { |
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
interface KoComponentRouterMiddlewareContext { | |
element: Node; | |
router: any; | |
route: any; | |
path: string; | |
pathname: string; | |
params: Object; | |
} | |
interface KoComponentRouterContext extends KoComponentRouterMiddlewareContext { |
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
function reverse_route(ctx) { | |
var paths = []; | |
var router = ctx; | |
var params = ctx.params || {}; | |
paths.unshift(router.route.path); | |
while (!router.isRoot && router.$parent) { | |
router = router.$parent; | |
Object.assign(params, router.params); | |
if (router) paths.unshift(router.route.path); |
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.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using System.Threading.Tasks; | |
//using Dapper.FastCrud; | |
//using Dapper.FastCrud.Configuration; | |
using Dapper.FastCrud.Configuration.StatementOptions; | |
//using Dapper.FastCrud.Configuration.StatementOptions.Builders; |
OlderNewer