Skip to content

Instantly share code, notes, and snippets.

View nenodias's full-sized avatar

Horácio Dias Baptista Neto nenodias

View GitHub Profile
@nenodias
nenodias / mongoengine_example.py
Last active March 5, 2018 13:20
Example DBRef
import pdb
from mongoengine import *
from mongoengine.base import BaseDocument
import json
from json import JSONEncoder
class MongoEncoder(JSONEncoder):
def default(self, o):
pdb.set_trace()
RE DO si la DO si la sol
sol la si la mi sol sol
la
RE DO si la DO si la sol
sol la si la mi sol sol
la
re si DO si la sol RE la la
@nenodias
nenodias / README.md
Created April 26, 2018 17:31
hub github fork e pull request

Example workflow for contributing to a project:

$ git clone github/hub $ cd hub

create a topic branch

$ git checkout -b feature

( making changes ... )

$ git commit -m "done with feature"

It's time to fork the repo!

$ git fork

sbi.database.web.url=jdbc:oracle:thin:@<HOST>:<PORTA>:<SERVIÇO>
sbi.database.web.user=<USUARIO_DB>
sbi.database.web.password=<SENHA_DB>
sbi.database.web.driver=oracle.jdbc.driver.OracleDriver
@nenodias
nenodias / README.md
Last active June 2, 2018 23:53
aseprite orangepi one armhf error

uname -a # for know arch Linux OrangePI 3.4.112 #1 SMP PREEMPT Mon Nov 14 17:00:28 CST 2016 armv7l armv7l armv7l GNU/Linux

Steps

1 - cmake -G Ninja ..

[noshift]
Key8=0:0
Key9=65307:27
Key10=49:49
Key11=50:50
Key12=51:51
Key13=52:52
Key14=53:53
Key15=54:54
Key16=55:55
import * as jwt from 'jsonwebtoken';
import { GraphQLFieldResolver } from "graphql";
import { ComposableResolver } from "./composable.resolver";
import { ResolverContext } from "../../interfaces/ResolverContextInterface";
import { JWT_SECRET } from '../../utils/utils';
export const verifyTokenResolver: ComposableResolver<any, ResolverContext> =
(resolver: GraphQLFieldResolver<any, ResolverContext>): GraphQLFieldResolver<any, ResolverContext> => {
@nenodias
nenodias / main.py
Created March 2, 2019 02:11
AceleraDev Python para Web - Processe dados dos jogadores do FIFA© 2017 usando Python
# coding: utf-8
import csv
import collections
import functools
# Todas as perguntas são referentes ao arquivo `data.csv`
# Você ** não ** pode utilizar o pandas e nem o numpy para este desafio.
def gen_csv():
def fn():
with open('data.csv', 'r') as f:
@nenodias
nenodias / index.html
Created March 13, 2019 23:30
Ajuda django
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" />
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.6/css/buttons.dataTables.min.css" />
@nenodias
nenodias / index.js
Last active March 14, 2019 01:21
index.js
'use strict';
const fs = require('fs');
const path = require('path');
const Sequelize = require('sequelize');
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../config/config.json')[env];
const db = {};