Skip to content

Instantly share code, notes, and snippets.

View riodw's full-sized avatar

Rio Weber riodw

View GitHub Profile

How to set up a new Production Server running Node on Ubuntu

START

Always start with an Update:

$ sudo apt-get update

Create folder for project:

$ mkdir production
<!-- Rio Weber
Create Custom HTML Element -->
<html>
<head>
<title>Make Custom HTML Element</title>
</head>
<body>
<hello-element></hello-element>
<script>
<!-- Useing the HTML "template" tag -->
<html>
<head>
<title>Use HTML Template tag</title>
</head>
<body>
<template id="t">
<div>Hello World!</div>
</template>
# BloomU.info
git init --bare
--------
git clone https://github.com/riodw/BloomU.git
------ OR ---------
git remote add origin https://github.com/riodw/BloomU.git
git fetch origin master:master
git reset --hard origin/master
@riodw
riodw / deploy.php
Last active May 8, 2023 08:54
Deploy to Production Server with git using PHP
<?php
/**
* GIT DEPLOYMENT SCRIPT
*
*/
// The commands
$commands = array(
'echo $PWD',
'whoami',
'git reset --hard HEAD',
"""Softmax."""
scores = [3.0, 1.0, 0.2]
import numpy as np
def softmax(x):
"""Compute softmax values for each sets of scores in x."""
pass # TODO: Compute and return softmax(x)
return np.exp(x) / np.sum(np.exp(x), axis=0)
@riodw
riodw / Mongodb_Data_Change.md
Last active September 20, 2020 12:53
How to listen for changes to a MongoDB collection?
@riodw
riodw / MongoDB-UserCollection-Data-Change_Send-Change-SocketIO.js
Created February 7, 2018 19:20
Notify socket.io users when MongoDB data collection changes
/* MongoDB-UserCollection-Data-Change_Send-Change-SocketIO.js */
'use strict'
module.exports = function (
app,
io,
User // Collection Name
) {
// SET WATCH ON COLLECTION
const changeStream = User.watch();
var keyPairs = [];
var params = window.location.search.substring(1).split('&');
for (var i = params.length - 1; i >= 0; i--) {
keyPairs.push(params[i].split('='));
};
/*
Apple Colors
https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/
*/
/* Blue */
.text-blue {
color: rgb(10, 132, 255);
}
.bg-blue {
background-color: rgb(10, 132, 255);