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
| # kubeconfig per session | |
| file="$(mktemp -t "kubectx.XXXXXX")" | |
| export KUBECONFIG="${file}:${KUBECONFIG}" | |
| cat <<EOF >"${file}" | |
| apiVersion: v1 | |
| kind: Config | |
| current-context: "" | |
| EOF |
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
| await $"scripts/00magic.sh --param {arg}".Bash(this.logger); |
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 ShellHelper | |
| { | |
| public static Task<int> Bash(this string cmd, ILogger logger) | |
| { | |
| var source = new TaskCompletionSource<int>(); | |
| var escapedArgs = cmd.Replace("\"", "\\\""); | |
| var process = new Process | |
| { | |
| StartInfo = new ProcessStartInfo | |
| { |
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
| System.config({ | |
| bundles: { | |
| "build/app-bundle.js": ['app.js'], | |
| "build/app-bundle-contact.js": ['contact/module.js'], | |
| "build/app-bundle-about.js": ['about/module.js'] | |
| } | |
| }); |
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 appRoot = "/"; | |
| var Builder = require('systemjs-builder'); | |
| // optional constructor options | |
| // sets the baseURL and loads the configuration file | |
| var builder = new Builder("/", 'config.js'); | |
| function build(entry, output) { | |
| var message = entry + " --> " + output; | |
| var begin = new Date(); |
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 class SystemLazyLoadService { | |
| static $inject = ["$ocLazyLoad"]; | |
| constructor($ocLazyLoad) { | |
| this.$ocLazyLoad = $ocLazyLoad; | |
| } | |
| load(src, moduleExportKey) { | |
| let loader = this.$ocLazyLoad; |
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 let app = angular.module("app", ["ui.router", "ct.ui.router.extras"]) | |
| .service("SystemLazyLoadService", SystemLazyLoadService) | |
| .config(["$stateProvider", "$urlRouterProvider", "$futureStateProvider", ($stateProvider, $urlRouterProvider, $futureStateProvider) => { | |
| $stateProvider.state('home', { | |
| url: "", | |
| template: template | |
| }); | |
| $urlRouterProvider.otherwise(""); |
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 cssInject = "(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})"; | |
| var escape = function (source) { | |
| return source | |
| .replace(/(["\\])/g, '\\$1') | |
| .replace(/[\f]/g, '\\f') | |
| .replace(/[\b]/g, '\\b') | |
| .replace(/[\n]/g, '\\n') | |
| .replace(/[\t]/g, '\\t') | |
| .replace(/[\r]/g, '\\r') |
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
| exports.translate = function (load) { | |
| return System.import("less/lib/less-browser") | |
| .then(function (lesscWrapper) { | |
| return lesscWrapper(window, { | |
| async: true, | |
| errorReporting: "Console" | |
| }); | |
| }) | |
| .then(function (lessc) { | |
| return lessc.render(load.source, { |
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
| less.render(lessInput, options) | |
| .then(function(output) { | |
| // output.css = string of css | |
| // output.map = string of sourcemap | |
| // output.imports = array of string filenames of the imports referenced | |
| }, | |
| function(error) { | |
| }); |
NewerOlder