Skip to content

Instantly share code, notes, and snippets.

Avatar
☠️

Walter Sphinxs

☠️
View GitHub Profile
View cloudSettings
{"lastUpload":"2020-10-18T13:01:59.574Z","extensionVersion":"v3.4.3"}
View traefik.yml
version: "3"
services:
application:
restart: always
build:
context: ./
dockerfile: Dockerfile
ports:
- "4000:4000"
@Sphinxs
Sphinxs / events.js
Created Jun 2, 2020
Node essentials
View events.js
const events = require("events");
const emitter = new events.EventEmitter();
const util = require("util");
// Basic example
emitter.on("message", message => {
console.log(message);
});
@Sphinxs
Sphinxs / Query.js
Last active Apr 21, 2020
Mongo / Mongoose query builder for nested objects
View Query.js
const _ = require("lodash");
const data = {
name: "Name",
age: 0,
house: {
color: "Color",
address: {
city: "City",
state: "State",
@Sphinxs
Sphinxs / Download.cpp
Last active Dec 19, 2019
Save binary files that are stored in Mongo database, in disk, through Mongo CXX driver in C++
View Download.cpp
// Makefile https://gist.github.com/Sphinxs/d45074044999fd43ba6af39e0ce20d3e (change SOURCES=binary.cpp to download.cpp)
// How to save a document in Mongo https://gist.github.com/Sphinxs/aba7d2b0ba0c1ff2fffb6baa76ad3797
#include <iostream>
#include <fstream>
#include <mongocxx/instance.hpp>
@Sphinxs
Sphinxs / Mongo-makefile
Last active Jun 30, 2019
Makefile for store binary files in Mongo database, through Mongo CXX driver in C++, script
View Mongo-makefile
COMPILER=g++
FLAGS=-Wall -Werror -std=c++17 -Werror=unused-variable
LIBRARIES=`pkg-config --libs libbson-1.0 libmongoc-1.0 libbsoncxx libmongocxx` -Wl,-rpath,/usr/local/lib
INCLUDES=`pkg-config --cflags libbson-1.0 libmongoc-1.0 libbsoncxx libmongocxx`
SOURCES=binary.cpp
@Sphinxs
Sphinxs / Mongo.cpp
Last active Sep 1, 2020
Store binary files in Mongo database, through Mongo CXX driver in C++
View Mongo.cpp
// Makefile https://gist.github.com/Sphinxs/d45074044999fd43ba6af39e0ce20d3e
// How to download a document from Mongo https://gist.github.com/Sphinxs/c7d08eb5efa8219be65505b9d0fd2811
#include <iostream>
#include <fstream>
#include <bsoncxx/types.hpp>
View howtoinstallsequeler.md

Sequeler Installation

Linux Ubuntu 18.04

Download the .deb package

cd ~/Downloads

wget http://packages.elementary.io/appcenter/pool/main/c/com.github.alecaddd.sequeler/com.github.alecaddd.sequeler_0.5.5_amd64.deb

Install the .deb package

sudo dpkg -i com.github.alecaddd.sequeler_0.5.5_amd64.deb

View Code.py
# Image I/O
import imageio
# Plots
import matplotlib.pyplot as pp
import matplotlib.patches as patches
View Objcts.py
# Plots
import matplotlib.patches as patches
# Image processing
from skimage import measure
# Plot objects
You can’t perform that action at this time.