kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
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
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 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 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 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 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 makeSerializable(obj, skipAttributes) { | |
if(_.isArray(obj)) { | |
var serializableArray = {} | |
for(var i = 0 ; i < obj.length ; i++) { | |
serializableArray[i] = makeSerializable(obj[i]) | |
} | |
return serializableArray | |
} else if(obj instanceof Object) { |
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 exec = require('child_process').exec | |
var Metrano = require('metrano) | |
var metrano = new Metrano('http://ice:3000/') | |
///home/nherment/Adafruit_Python_DHT/examples/AdafruitDHT.py 22 P8_11 | |
exec('/home/nherment/Adafruit_Python_DHT/examples/AdafruitDHT.py 22 P8_11', function(err, stdout, stderr) { | |
if(err) { | |
console.log(err); |
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 FooPublic() { | |
this._publicVariable; | |
} | |
FooPublic.prototype.increment = function() { | |
return ++ this._publicVariable; | |
} |
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
18:11:15.336|WARN|failed ContextHandlerCollection@1a15cd9a: java.lang.NoSuchFieldError: IS_SECURITY_ENABLED | |
18:11:15.344|ERROR|Error starting handlers | |
java.lang.NoSuchFieldError: IS_SECURITY_ENABLED | |
at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:197) ~[jsp-2.1-6.1.14.jar:6.1.14] | |
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:150) ~[jsp-2.1-6.1.14.jar:6.1.14] | |
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440) ~[jetty-6.1.26.jar:6.1.26] | |
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263) ~[jetty-6.1.26.jar:6.1.26] | |
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.26.jar:6.1.26] | |
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736) ~[jetty-6.1.26.jar:6.1.26] | |
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) ~[jetty-6.1.26.jar:6.1.26] |
NewerOlder