Skip to content

Instantly share code, notes, and snippets.

Sham Vinicius Fiorin skatesham

Block or report user

Report or block skatesham

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
skatesham /
Created Sep 13, 2018
Script Set Up Github with Python3 in command line
#! /usr/bin/python
import subprocess
print("Automatic Watched Set Up of Github in Python")
print("-----------by Sham Vinicius Fiorin-----------------")
config = input("Set up configurations[N/s]?")
if('s' in config.lower()):["git", "init"])
skatesham / mongodb-dao.js
Created Feb 4, 2018 — forked from JavascriptMick/mongodb-dao.js
Simple Node.js Utility module to enable easy creation of models using node-mongodb-native
View mongodb-dao.js
Simple Node.js Utility module to enable easy creation of models using node-mongodb-native
var dao = require('./mongodb-dao');
exports.NewClient = function(clientId, plan){
return {
clientId: clientId,
plan: plan,
skatesham / CategoryRepository.js
Created Feb 4, 2018 — forked from lifecoder/CategoryRepository.js
simple DAO example for nodejs
View CategoryRepository.js
var mongo = require('mongodb'),
EventEmitter = require('events').EventEmitter;
function Connector(settings) {
settings.port = settings.port || mongo.Connection.DEFAULT_PORT;
this.settings = settings;
this.server = new mongo.Server(, settings.port);
this.db = new mongo.Db(settings.database, this.server, {native_parser: true});
skatesham / index.js
Created Jan 22, 2018 — forked from codediodeio/index.js
Firebase Cloud Functions image thumbnail generator using Sharp for 4x faster resizing
View index.js
const functions = require('firebase-functions');
const gcs = require('@google-cloud/storage')();
const sharp = require('sharp')
const _ = require('lodash');
const path = require('path');
const os = require('os');
exports.generateThumbnail ='uploads/{imageId}').onChange(event => {
const object =; // The Storage object.
skatesham / gist:70515b6b9c250f96aa199981f1214097
Created Sep 12, 2017 — forked from ilusi/gist:4205101
m101 hw5.1 to 5.4 - Aggregation Framework
View gist:70515b6b9c250f96aa199981f1214097
// $sum
{ $group:
"_id": {
"state": "$state"
"population": { "$sum": "$pop" }
skatesham / CRUD
Created Aug 8, 2017 — forked from fmasanori/CRUD
CRUD MongoDB exception
import pymongo
import sys
def main():
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.m101
people = db.people
person = {'name': 'Barack Obama', 'role':'President',
'address':{'address1':'The White House',
'street': '1600 Pensylvania Avenue',
skatesham / CRUD
Created Aug 8, 2017 — forked from fmasanori/CRUD
CRUD MongoDB Python2
from datetime import datetime
from pymongo import MongoClient
connection = MongoClient("mongodb://localhost")
db = connection.test
post = {"title": "My Blog Post",
"content": "Here's my blog post.",
"date": datetime.utcnow()}
View Oficina MongoDB e Python FISL
Oficina MongoDB e Python - FISL
Install python 2.7 (provavelmente vc já tem)
para testar python -V
Install mongoDB 3.4
criar diretório \data\db com as permissões necessárias para testar bin\mongod (servidor)
skatesham / Funçã
Last active Mar 16, 2016
Questão de Estrutura de Dados - Entrega 5
View Funçã
import unittest
class Pilha():
def __init__(self):
self.lista = []
def empilhar(self, valor):
def vazia(self):
skatesham /
Last active Mar 8, 2016
Lista Encadeada Duplamente Ligada
class ListaVaziaErro(Exception):
class Noh():
def __init__(self, valor, esquerdo = None, direito = None):
self.valor = valor
self.direito = direito
self.esquerdo = esquerdo
You can’t perform that action at this time.