Skip to content

Instantly share code, notes, and snippets.

View kublermdk's full-sized avatar

Michael Kubler kublermdk

View GitHub Profile
@kublermdk
kublermdk / exampleGoogleAutoMLPrediction.php
Created October 6, 2020 17:15
Example Google AutoML Prediction with a Google Cloud Storage source
<?php
// --------------------------------------------------
// Example Google Cloud AutoML Prediction
// --------------------------------------------------
// @author Michael Kubler
// @date 2020-10-07th
// This is a cut down gist of what you need to
// make a Google Cloud AutoML (Auto Machine Learning)
// prediction request, based off an already uploaded
@ribtoks
ribtoks / SS-earnings.ipynb
Created July 30, 2020 12:14
Shutterstock earnings trend evaluation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kublermdk
kublermdk / ExampleGeneralMongoDBAggregations.js
Created May 10, 2020 09:09
An example of the MongoDB Aggregation pipelines and commands used for some general filters. View
// -----------------------------------------------------------------
// Applying aggregation pipeline #1 Customer - HAVE
// -----------------------------------------------------------------
db.command({
"aggregate": "app.customer",
"pipeline": [{
"$match": {
"$and": [{
// -- Ensure the customers we are selecting are active and have a Firebase token so we can send them a push notification
"status": "active",
@kublermdk
kublermdk / Example Customer and Customer Transaction.js
Last active May 10, 2020 09:23
An example of a Customer and Customer Transaction for the article "Advanced Filtering with MongoDB Aggregation Pipelines"
{
"customer": {
"_id": "5eb3d000af2f5c073c089cd2", // ObjectId
"name": "Michael Kubler",
"dateOfBirth": 467683200, // Unix time
"state": "SA",
"gender": "male",
"status": "active",
"createdAt": 1588760101, // Unix time
"updatedAt": 1588760914 // Unix time
@nilayp
nilayp / git-backup-to-Backblaze-B2.sh
Last active May 23, 2023 00:46 — forked from philippb/git-backup-to-AWS-S3.sh
Complete git repository backup script to Backblaze B2
#!/bin/bash
# Script to backup git repo to Backblaze B2
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc
# Ensure you have authorized the B2 command line tool with the correct account AND added your SSH
# public key to your github account, if you need to backup private repositories.
# To restore this repo in the future, download it from B2, extract it and then use this command:
# cd old-repository.git
@patrickleet
patrickleet / gist:6312627
Created August 22, 2013 20:51
meteor.js cheatsheet
// Assuming the following directory structure
/*
app/
.meteor/
client/
server/
collections/
*/
// 1. Create a collection
@dweldon
dweldon / meteor-nginx
Last active January 22, 2024 06:53
This is an example of how to configure nginx to serve a meteor app.
server {
listen [::]:80;
listen 80;
server_name app.example.com;
return 301 https://$server_name$request_uri;
}
server {
@gabrielhpugliese
gabrielhpugliese / meteor-windows-vagrant-tutorial.md
Last active April 19, 2022 14:37
Tutorial for running Meteor in Windows using Vagrant

Tutorial: Meteor in Windows using Vagrant

BEFORE YOU CONTINUE:

  • Now, Meteor runs in any Windows without any line of this tutorial. Just download the Meteor binary! Yay!!
  • mrt is no longer used with Meteor 1.0

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on

@webdesserts
webdesserts / Gulpfile.js
Last active April 3, 2023 08:16
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.
@matb33
matb33 / gist:5322002
Last active December 15, 2015 20:58
Automated server installation for Meteor 0.6.0+ on a fresh AWS EC2 Ubuntu Server 12.10 installation. Although MongoDB is installed, I only tested against having my database remotely on MongoHQ. Let me know if you have issues with a local DB. Moved: https://github.com/matb33/meteor-ec2-install
MOVED: https://github.com/matb33/meteor-ec2-install