Skip to content

Instantly share code, notes, and snippets.

View mignev's full-sized avatar

Marian Ignev mignev

View GitHub Profile
@jthomas
jthomas / index.js
Created August 10, 2018 11:44
Serverless Machine Learning With TensorFlow.js and IBM Cloud Functions (Apache OpenWhisk)
const tf = require('@tensorflow/tfjs')
const mobilenet = require('@tensorflow-models/mobilenet');
require('@tensorflow/tfjs-node')
const jpeg = require('jpeg-js');
const NUMBER_OF_CHANNELS = 3
const MODEL_PATH = 'mobilenet/model.json'
let mn_model
@bombdiggity
bombdiggity / keras_model_export.py
Last active August 17, 2020 11:40
Code to export Keras model to ProtoBuf format
from keras import backend as K
from keras.models import load_model
from tensorflow.python.saved_model import builder as saved_model_builder
from tensorflow.python.saved_model.signature_def_utils import predict_signature_def
from tensorflow.python.saved_model import tag_constants
# Function to export Keras model to Protocol Buffer format
# Inputs:
# path_to_h5: Path to Keras h5 model
# export_path: Path to store Protocol Buffer model
@pivanov
pivanov / app.js
Created March 23, 2018 10:57
This is your `cloud/app.js` file
/*
* Advanced Cloud Code Example
*/
const connect = require('connect')
const serveStatic = require('serve-static')
const vhost = require('vhost')
const express = require('express');
const app = express();
@Kukunin
Kukunin / my_grape_api.rb
Last active November 24, 2022 12:31
Ruby Grape API authorization with Pundit example, without any extra gems
class MyGrapeAPI < Grape::API
helpers Pundit
after { verify_authorized }
helpers do
def current_user
nil # your authentication mechanism
end
end
@procrastinatio
procrastinatio / haproxy_rate_limiting.md
Created October 25, 2017 06:04
Rate limiting with HAproxy

Introduction

So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])

@philips
philips / users.md
Last active April 5, 2023 14:17
Kubernetes Third-Party Resource Users
@mignev
mignev / vault-tests.md
Created September 17, 2016 22:54 — forked from come-maiz/testers.md
Vault snap testing
@dreikanter
dreikanter / encrypt_openssl.md
Last active May 2, 2024 12:55 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@gabonator
gabonator / password.txt
Last active May 1, 2024 18:47
HiSilicon IP camera root passwords
Summary of passwords by sperglord8008s, updated November 1. 2020. For login try "root", "default", "defaul" or "root"
00000000
059AnkJ
4uvdzKqBkj.jg
7ujMko0admin
7ujMko0vizxv
123
1111
1234