This file contains 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 SVGElement { | |
readonly dataset: DOMStringMap; | |
} |
This file contains 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; | |
namespace DapperSample { | |
public static class StaticReflection { | |
public static string GetMemberName<T>( |
This file contains 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; |
This file contains 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 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 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 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 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 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 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 |
NewerOlder