View mongosh-fle-local-kms.js
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
// To run this script you can start the shell with `mongosh --nodb` | |
// Wrap everything into a function so we don't | |
// affect the shell's scope | |
(function insertTestData() { | |
// Config DB and Collection names | |
const dbName = '<TEST_DBNAME>'; | |
const collectionName = '<TEST_COLLNAME>'; | |
const mongoDBConnectionString = '<MONGODB_CONNECTION_STRING>'; |
View mongosh-fle-gcp-kms.js
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
// To run this script you can start the shell with `mongosh --nodb` | |
// Wrap everything into a function so we don't | |
// affect the shell's scope | |
(function insertTestData() { | |
// Config DB and Collection names | |
const dbName = '<TEST_DBNAME>'; | |
const collectionName = '<TEST_COLLNAME>'; | |
const mongoDBAtlasConnectionString = '<MONGODB_ATLAS_CONNECTION_STRING>'; |
View sales.mongodb.js
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
// MongoDB Playground | |
// To disable this template go to Settings | MongoDB | Use Default Template For Playground. | |
// Make sure you are connected to enable completions and to be able to run a playground. | |
// Use Ctrl+Space inside a snippet or a string literal to trigger completions. | |
// Select the database to use. | |
use('mongodbVSCodePlaygroundDB'); | |
// The drop() command destroys all data from a collection. | |
// Make sure you run it against proper database and collection. |
View youtube-helium.js
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
[].slice.apply(document.querySelectorAll('.yt-lockup-title a.spf-link')).forEach(l => {const h = l.getAttribute('href'); l.setAttribute('href', `helium://https://www.youtube.com${h}`)}) |
View Vagrantfile
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
# No need to sync the vagrant folder, everything gets deployed | |
# with the ansible playbook |
View playbook.yml
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
- name: link to Keymetrics | |
command: pm2 link {{ keymetrics_secret_key }} {{ keymetrics_public_key }} | |
when: keymetrics | |
become: yes | |
become_user: apps | |
ignore_errors: yes |
View playbook.yml
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
tasks: | |
- name: install nginx | |
apt: name=nginx state=present update_cache=yes | |
notify: | |
- start nginx | |
- name: configure nginx | |
copy: src={{ item }} dest=/etc/nginx/sites-available/ | |
with_fileglob: | |
- ./nginx/* | |
notify: |
View app.conf
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
location /app { | |
proxy_pass http://localhost:3001; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} |
View default
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name localhost; |
View app.conf
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
location /app { | |
proxy_pass http://localhost:3001; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} |
NewerOlder