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
| const glob = require('glob'); | |
| const fs = require("fs"); | |
| const EXCLUSION_PATTERNS = /min/; | |
| glob("**/*.*", function(err, files) { | |
| files.forEach(f => { | |
| if (fs.statSync(f).isDirectory() || EXCLUSION_PATTERNS.test(f)) { | |
| return |
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
| #!/usr/bin/env bash | |
| # Subtree archive script | |
| # ------- | |
| # | |
| # Archive your repos into single and keeps all commit history. | |
| # | |
| # Please change github username before you use. | |
| REPO=$1 |
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
| const fs = require("fs") | |
| function borderColorToType(borderColor) { | |
| return { | |
| 2848996: "Integration", | |
| 10027263: "Decision", | |
| 40463: "Authentication", | |
| 13576743: "Technical" |
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
| https://press.one/p/v?s=6f1036adf9aa7696078f264821a0a455036000dda0c1aed609bcea373e3afdba31f5fb6bf5bca4c031b75a991dc258b3f79b867ede2aa9c9ef9e2de92257070d01&h=2e93097a91c5b05e4484eab68e9d1fcbd9e2c900f5328d14bf2a84c241ca3b92&a=43c0f7e052d170387e2a6648347a69ea50bba7b0&f=P1&v=3 |
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 validate(schema, value, strict = false, key = undefined) { | |
| if (value === undefined) { | |
| if (strict) { | |
| throw new TypeError(`undefined value for ${key}: ${schema}`) | |
| } else { | |
| return; | |
| } | |
| } | |
| if (schema instanceof Schema) { |
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
| #include <string> | |
| using namespace std; | |
| constexpr char to_char(unsigned x) | |
| { | |
| return x % 10 + '0'; | |
| } | |
| template <unsigned... digits> |
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
| #include <cassert> | |
| #include <map> | |
| #include <set> | |
| #include <string> | |
| #include <algorithm> | |
| #include <iterator> | |
| #include <iostream> | |
| #include <fstream> |
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
| const REPLACEMENT = "1234590" | |
| const ORIGINAL = "lzeasgo" | |
| const MATCHER = new RegExp("["+ORIGINAL+"]", "ig") | |
| module.export = function (text) { | |
| return text.replace(MATCHER, function(c) { | |
| return REPLACEMENT.charAt(ORIGINAL.indexOf(c.toLowerCase())) | |
| }) | |
| } |
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
| import lombok.AllArgsConstructor; | |
| import lombok.Data; | |
| import lombok.NoArgsConstructor; | |
| interface Freight { | |
| void accept(FreightVisitor visitor); | |
| } | |
| interface FreightVisitor { |
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
| #!/usr/bin/env bash | |
| KUBEENV=$1 | |
| KUBECFG="${HOME}/.kube/config.${KUBEENV}" | |
| TARGET="${HOME}/.kube/config" | |
| die() { | |
| echo $1 | |
| exit 1 | |
| } |
NewerOlder