Skip to content

Instantly share code, notes, and snippets.

View jaydestro's full-sized avatar

Jay Gordon jaydestro

View GitHub Profile
<!-- Chartbeat tracking -->
<script type='text/javascript'>
var _sf_async_config={};
/** CONFIGURATION START **/
_sf_async_config.uid = 43887;
_sf_async_config.domain = 'si.com';
_sf_async_config.useCanonical = true;
_sf_async_config.sections = 'NBA';
_sf_async_config.authors = 'LeBron James (as told to Lee Jenkins)';
/** CONFIGURATION END **/
delete-objects | get-bucket-acl
get-bucket-cors | get-bucket-lifecycle
get-bucket-location | get-bucket-logging
get-bucket-notification | get-bucket-policy
get-bucket-request-payment | get-bucket-tagging
get-bucket-versioning | get-bucket-website
get-object | get-object-acl
var MongoClient = require('mongodb').MongoClient
, format = require('util').format;
MongoClient.connect('mongodb://', function (err, db) {
if (err) {
throw err;
} else {
console.log("successfully connected to the database");
}
db.close();
});
https://auth.verizon.com/amserver/UI/Login?realm=dotcom&module=AIAW&goto=https://signin.verizon.com/sso/choice/tvpHandler.jsp?loginType%3DvzRedirect%26partner%3Dmsnbc%26partnerlogo%3Dnull%26RelayState%3D_249ecb7a-28b3-45b9-a002-cfc3c00525c8%26cancelURL%3Dhttps%253A%252F%252Fsp.auth.adobe.com%252Fadobe-services%252F1.0%252Fsession%253Fcancelled%253D1%2526_method%253DPOST%2526mso_id%253DVerizon%2526redirect_url%253Dhttp%25253A%25252F%25252Fwww.msnbc.com%25252Fnow%26TARGET%3Dhttps%253A%252F%252Fsp.auth.adobe.com%252Fsp%252Fsaml%252FSAMLAssertionConsumer%253Fredirect_url%253Dhttp%25253A%25252F%25252Fwww.msnbc.com%25252Fnow&clientId=TvLogin&partner=msnbc&errorURL=https://signin.verizon.com/sso/VOLPortalLogin?src%3DSAM%26loginType%3DvzRedirect%26partner%3Dmsnbc%26partnerlogo%3Dnull%26RelayState%3D_249ecb7a-28b3-45b9-a002-cfc3c00525c8%26cancelURL%3Dhttps%253A%252F%252Fsp.auth.adobe.com%252Fadobe-services%252F1.0%252Fsession%253Fcancelled%253D1%2526_method%253DPOST%2526mso_id%253DVerizon%2526redirect_url%253Dhttp%252
#!/bin/bash
timestamp=$(date +%s)
mkdir -p /goaccess/latest-$timestamp/
cp /var/log/nginx/access.log* /goaccess/latest-$timestamp/
cd /goaccess/latest-$timestamp/
FROM node:boron
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
EXPOSE 3000
CMD ["npm", "start"]
@jaydestro
jaydestro / Dockerfile
Created September 6, 2017 16:58
Dockerfile
FROM node:boron
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
EXPOSE 3000
CMD ["npm", "start"]
@jaydestro
jaydestro / app.yaml
Created May 22, 2018 17:22
app.yaml
# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@jaydestro
jaydestro / minikubedelete
Created May 31, 2018 20:04 — forked from sharepointoscar/minikubedelete
Minikube - Delete all pods from default namespace
# delete all pods
kubectl delete --all pods --namespace=default
# deete all deployments
kubectl delete --all deployments --namespace=default
# delete all services
kubectl delete --all services --namespace=default
@jaydestro
jaydestro / ruby and mongodb
Created June 12, 2018 18:02
ruby and mongodb
require 'mongo' # requires mongoid to be installed
Mongo::Logger.logger.level = ::Logger::FATAL # provides logging output for fails
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'hackathon') # establishes database connection to localhost, database name hackathon
client.collections.each { |coll| puts coll.name } # does a loop on listing each collection in database and then prints them to standard out
client.close # closes database connection