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
| 'use strict'; | |
| const https = require('https'); | |
| class Slack { | |
| constructor(slackPath) { | |
| this._options = { | |
| hostname: "hooks.slack.com", | |
| method: "POST", | |
| path: slackPath, |
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 testString = "cat you cat are a cat who is a cat nope not a cat"; | |
| var tokenized = testString.split(" "); | |
| var tokenFreq = tokenized.reduce((acc, val) => { acc[val] ? acc[val]++ : acc[val] = 1; return acc; }, {}); | |
| Object.entries(tokenFreq).forEach(entry => console.log(entry[0], ": ", entry[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
| let context = JSContext()! | |
| let myNumber = 12 | |
| context.setObject(myNumber, forKeyedSubscript: "myNumber" as NSString) | |
| let result = context.evaluateScript("myNumber + 20;") | |
| print("JavaScript eval: \(result!.toInt32())") |
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 | |
| node --version | |
| npm install -g n | |
| npm cache clean -f | |
| sudo n stable | |
| npm update -g |
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 | |
| HELM_CHART_DIR="../../helm_charts" | |
| helm dependency update | |
| helm package -d "$HELM_CHART_DIR" . | |
| helm repo index "$HELM_CHART_DIR" |
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 | |
| docker system prune --all --volumes |
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 | |
| mkdir -p log lib etc | |
| sudo docker run -it --rm --name certbot -v $PWD/etc:/etc/letsencrypt -v $PWD/lib:/var/lib/letsencrypt -v $PWD/log:/var/log/letsencrypt certbot/certbot certonly --debug --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory |
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
| start on startup | |
| task | |
| exec /usr/sbin/vbetool dpms off |
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
| video_allow_rotate = "true" | |
| video_rotation = "3" | |
| aspect_ratio_index = "19" | |
| video_aspect_ratio_auto = false | |
| video_aspect_ratio = .75 |
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
| FROM ubuntu:latest | |
| MAINTAINER [email protected] | |
| RUN apt-get --assume-yes update | |
| RUN apt-get --assume-yes install docker.io iputils-ping net-tools netcat bash | |
| ENV DOCKER_HOST 172.17.0.1 | |
| ENTRYPOINT ["ping", "localhost"] |