kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
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/bash | |
| # herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
| # rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
| # compress the data files, create a restore script, and push it all up to S3. | |
| TODAY=`date +"%Y.%m.%d"` | |
| INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
| INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
| BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
| BACKUPDIR="/mnt/es-backups/" | |
| YEARMONTH=`date +"%Y-%m"` |
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
| -- As postgres user: | |
| CREATE DATABASE <DB_NAME>; | |
| CREATE USER <USERNAME> WITH LOGIN ENCRYPTED PASSWORD '<PASSWORD>'; | |
| GRANT ALL PRIVILEGES ON DATABASE <DB_NAME> TO <USERNAME>; | |
| ALTER DATABASE <DB_NAME> OWNER TO <USERNAME>; | |
| -- grant read-only | |
| GRANT CONNECT ON DATABASE <DB_NAME> TO <USERNAME>; |
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 | |
| USER="nherment" | |
| NODE_ENV="production" | |
| PORT="5000" | |
| APP_DIR="/opt/node-app/latest" | |
| NODE_APP="server.js" | |
| KWARGS="" | |
| APP_NAME="node-app" | |
| PID_DIR="/var/run" |
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 | |
| ##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80 | |
| ## | |
| ## Debian / Linux / Ubuntu / LSB | |
| ## Startup script for Express / Node.js application with the forever module | |
| ## | |
| ## | |
| ## A modification of "init.d.lsb.ex" by Nicolas Thouvenin | |
| ## | |
| ## |
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
| WITH sea_legs AS ( | |
| SELECT | |
| v.class AS vessel_class, | |
| pc.id AS arrival_port_call_id, | |
| pc.un_locode AS arrival_port, | |
| CASE WHEN pc.eta_is_actual THEN pc.eta ELSE NULL END actual_arrival_time, | |
| LAG(pc.id) OVER w AS departure_port_call_id, | |
| LAG(pc.un_locode) OVER w AS departure_port, | |
| CASE WHEN LAG(pc.etd_is_actual) OVER w THEN LAG(pc.etd) OVER w ELSE NULL END actual_departure_time | |
| FROM port_calls AS pc |
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 doMapReduce = function(options, callback) { | |
| var map = function () { | |
| var dateKey = new Date(options.time.getTime()); | |
| dateKey.setMinutes(0); | |
| dateKey.setSeconds(0); | |
| dateKey.setMilliseconds(0); | |
| var mapped = { |
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 readLine = require("readline"); | |
| const rl = readLine.createInterface({output: process.stdout, input:process.stdin}); | |
| const dgram = require('dgram'); | |
| const server = dgram.createSocket('udp4'); | |
| // This regex extracts everything after the first / in the requested URL that isn't | |
| // part of a HTTP(S):// prefix. | |
| const siteRegex = /"GET.*?[^\/]\/([^\/]\S+)/; |
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 FooPublic() { | |
| this._publicVariable; | |
| } | |
| FooPublic.prototype.increment = function() { | |
| return ++ this._publicVariable; | |
| } | |
NewerOlder