Overview:
- Install hypervisor (Virtualbox)
- Get and install Kubectl (repositories)
- Get and install Minikube last version
- Start and Test Minikube local cluster and expose demo service
service: apt-api | |
# Use the serverless-webpack plugin to transpile ES6 | |
plugins: | |
- serverless-webpack | |
- serverless-offline | |
custom: | |
# Our stage is based on what is passed in when running serverless | |
# commands. Or fallsback to what we have set in the provider section. |
public class ApplicationUserManager : UserManager<AspNetUser, long> | |
{ | |
public ApplicationUserManager(IUserStore<AspNetUser, long> store) | |
: base(store) | |
{ | |
} | |
public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, | |
IOwinContext context) | |
{ |
UPDATE: I have baked the ideas in this file inside a Python CLI tool called pyds-cli
. Please find it here: https://github.com/ericmjl/pyds-cli
Having done a number of data projects over the years, and having seen a number of them up on GitHub, I've come to see that there's a wide range in terms of how "readable" a project is. I'd like to share some practices that I have come to adopt in my projects, which I hope will bring some organization to your projects.
Disclaimer: I'm hoping nobody takes this to be "the definitive guide" to organizing a data project; rather, I hope you, the reader, find useful tips that you can adapt to your own projects.
Disclaimer 2: What I’m writing below is primarily geared towards Python language users. Some ideas may be transferable to other languages; others may not be so. Please feel free to remix whatever you see here!
#include <Arduino.h> | |
#include <Event.h> | |
#include <Timer.h> | |
#include <EEPROM.h> | |
#include <ArduinoJson.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#include <YoutubeApi.h> |
# Codility challenge | |
# Given a string containing opening braces '(' and closing braces ')' | |
# Return the index where you have the same number of opening and closing braces | |
# Example: | |
# Given '(())' the equilibrium index is two because there are the same number | |
# of opening brackets to the left as there are closing brackets to the right | |
# | |
# Given '(((' the equilibrium index is 0 because there are no opening brackets | |
# before index 0 and there are 0 closing brackets at that position | |
# |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace RsaEncryptionSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
var http = require('http'); | |
exports.handler = function(event, context) { | |
http.get('http://httpbin.org/get', function(res) { | |
var body = ''; | |
res.on('data', function(chunk) { | |
body += chunk; | |
}); | |
res.on('end', function() { |